 |
|
|
 |
|
 |
how i can try this code not with real ip if i want send to computer in newwork
|
|
|
|
 |
|
 |
hi thangaraju ur work is price worthy....thanks for your article.....
|
|
|
|
 |
|
 |
Just a quick question, is there a newer or an updated version of this type of tutorial? Just a though.
Thanks.
The slowest component sits at the keyboard.
|
|
|
|
 |
|
 |
Nice example, however, nowadays, there is no need to really re-invent the wheel, you can use .Net Protocol Builder to generate the code for your packets listener and client/server connections ... this tool can generate thousands of lines and packets in seconds ... with threaded listener and non-blocking modes .... see www.protocol-builder.com
|
|
|
|
 |
|
 |
Quit trying to sell products here!
NOT COOL!
|
|
|
|
 |
|
 |
Very good example for TCP
|
|
|
|
 |
|
 |
Thank you very much for this lovely tutorial, I do believe that the day where you need to write your own protocol has gone, with the tools available to build complete protocol in seconds, recently, I used .Net protocol builder to build packets and client/server connections it works like a charm the idea is to build your packets visually and the program will emit all the required code for these packets so you need to deal with objects rather than raw data (bytes) the program can be found in www.protocol-builder.com give it a try and see what I am talking about, ah by the way it generates documentation for your own protocol.
|
|
|
|
 |
|
 |
Thanx!!! I'm so exited right now!
Gona write my first multiplayer game thx to you!!
Everything works perfect!
Thankz!
|
|
|
|
 |
|
 |
Um. Not to be a jerk or anything, but this example uses TCPclient/listener. If you want to make something high end, you might want to consider writing your own wrapper for Sockets like I did with features like Thread Pooling so you can offer service to hundreds of clients. (like 800 lol)
|
|
|
|
 |
|
|
 |
|
 |
Is the code you've write available?
|
|
|
|
 |
|
 |
GOOD JOB. Really GOOD JOB !!
|
|
|
|
 |
|
 |
Hello,
this is a good example and works fine until I am using IP 127.0.0.1 (The server is running on the same machine), but the client raises error;
"no connection could be made bacause the target machine activley refused it."
When I use the system's network IP (192.168.0.55) instead of 127.0.0.1. Same problem when I use static IP on some remote machine.
|
|
|
|
 |
|
 |
If the server is listening on localhost (127.0.0.1), you can connect only from localhost. Let the server listen on system's network IP.
|
|
|
|
 |
|
 |
I have been looking for a simple C# server/client for a robot. If you are new to programing in C# this is the server/client for you.
|
|
|
|
 |
|
 |
Why didn't I try client/server sooner?
|
|
|
|
 |
|
 |
Precisely what I thought!
Just finished making an "upgraded" version (Error checking, threading, message events, etc.) of the server side in a test project (as a new .cs of course), added it to a media player I've been working on and hooked the events and it just WORKED, no problems whatsoever. Well my Listen() function had a leak but otherwise...
Got it checking for new messages from the client every 20 MS at the moment, 0% CPU usage... Absolutely loving this.
|
|
|
|
 |
|
 |
hello everybody.
I'm new at C#. I want to set the ReveiveTimeOut for this server sample, because it's waiting for a long time.
How can I do it?
Please help.
Thanks
|
|
|
|
 |
|
 |
hello everybody.
I'm new at C#. I get this error when i run this application.
"The type or namespace name 'Net' does not exist in the namespace 'System' (are you missing an assembly reference?)."
where can i find the namespace 'Net'?
thanks.
Mess with the best, die like the rest.
|
|
|
|
 |
|
 |
you have to add a reference in the project to System.Net
|
|
|
|
 |
|
 |
anyone can help me in this problem?
I am kinda new in using C#...
|
|
|
|
 |
|
 |
The code is simple, straight to the point, and works great! Now...how would we set up the server to recieve multiple connections from different clients?
- =[M A S T E R S Dev]= -
www.3d-design.0catch.com
|
|
|
|
 |
|
 |
Multiple Connections is a fun subject and it all depends on how many people you recon are going to use it at one point. But its probably going to be in the region of 1 - 3 people for a small app. so what you want to do is to create your clients so that they connect to your server then wait to be sent an interger you then have to make the client disconnect then chenge the port number to the interger returned and attempt to connect. Then back on your werver you need a "LOBBY" port that will accept all connections then will send the number of a free port to the client then disconnec, Next your server will start a new thread to wait for it to connect but try and time the thread out as you must realise the client may fail! - another way is to make the client send the local EndPoint to the server and get the server to connect to the client. I personaly preffer the first option
|
|
|
|
 |
|
 |
If the client and server are in different machines. Is there a way by which the server knows the IP address of the client ?
Any help will be great.
Saleem
|
|
|
|
 |