C# Socket Server

Posts 17 of 7 · Page 1 of 1
C# Socket Server
Hello @ALL,

currently im looking for a tutorial or guide which teaches me on how to build a socket server with client communication in C#.

Im not new to C# but i didnt used the network stuff till now.

The reason why i want to learn that stuff is, i want to write my own game socket server which handles the connections, update the clients, send commands to the client and so on.

There are some solutions out but they have huge limitations like the smartfox server which offers only 20 connections per session and the full license costs around 2000 euros.

And of course, i want to increase my C# knowledge.

It would be nice if someone can help me or providing a tutorial/guide

Big thanks.
Sorry for the late answer but many thanks for your articles, ill have a look at it.

The weird thing is, i know how to write a async socket server but i dont know how to create/send commands like "connect, disconnect, login, logout and so on".

It would be nice if you have some other examples or tips on how to send commands to the server/client.

Thanks.
Quote Originally Posted by Devil589 View Post
Sorry for the late answer but many thanks for your articles, ill have a look at it.

The weird thing is, i know how to write a async socket server but i dont know how to create/send commands like "connect, disconnect, login, logout and so on".

It would be nice if you have some other examples or tips on how to send commands to the server/client.

Thanks.
That's pretty easy if you get a basic knowledge of how sockets work.
Thanks.

Well, one thing i want to know, is it better to create commands like "loginRequest" or "x01235"?

Because in some examples they used the whole word and i some other examples the other thing which looks like a packet.

The question now is, what's better?
Quote Originally Posted by Devil589 View Post
Thanks.

Well, one thing i want to know, is it better to create commands like "loginRequest" or "x01235"?

Because in some examples they used the whole word and i some other examples the other thing which looks like a packet.

The question now is, what's better?
What is the most coder/user -friendly to do is my suggestion
Good Luck
Quote Originally Posted by Devil589 View Post
Thanks.

Well, one thing i want to know, is it better to create commands like "loginRequest" or "x01235"?

Because in some examples they used the whole word and i some other examples the other thing which looks like a packet.

The question now is, what's better?
It really depends. Using classes to group a long information is better than using strings or enumerators. But if you want to perform a simple command it might be better if you use a string.
Posts 17 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?