Skip to content
csharp client for ezyfox server
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Properties
builder
callback
codec
command
concurrent
config
constant
entity
event
exception
factory
function
handler
io
lib
logger
manager
net
request
security
socket
util
.gitignore
EzyClient.cs
EzyClientAware.cs
EzyClients.cs
EzyTcpClient.cs
Program.cs
README.md
packages.config

README.md

ezyfox-server-csharp-client

csharp, unity client for ezyfox server

Synopsis

csharp, unity client for ezyfox server

Code Example

1. Create a TCP Client

EzyClientConfig clientConfig = EzyClientConfig
				.builder()
				.zoneName("freechat")
				.build();
EzyClient client = EzyClients.getInstance().newDefaultClient(clientConfig);
EzySetup setup = client.get<EzySetup>();
setup.addEventHandler(EzyEventType.CONNECTION_SUCCESS, new EzyConnectionSuccessHandler());
setup.addEventHandler(EzyEventType.CONNECTION_FAILURE, new EzyConnectionFailureHandler());
setup.addDataHandler(EzyCommand.HANDSHAKE, new ExHandshakeEventHandler());

2. Connect to server

client.connect("31.12.1.2", 3005);

3. Handle socket's events on main thread

while (true)
{
	Thread.Sleep(3);
	client.processEvents();
}
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.