.NET Networking

Sestar

Senior member
Dec 26, 2001
316
0
0
Is there a good guide to networking in .NET, with emphasis on client server programming.
 

BuckleDownBen

Banned
Jun 11, 2001
519
0
0
do you mean something different than accessing a database over a network? if that's all you want to do, then look for a book on ado.net.
 

joohang

Lifer
Oct 22, 2000
12,340
1
0


<< Is there a good guide to networking in .NET, with emphasis on client server programming. >>


Like what? Perhaps the System.Net class library has the stuff you want.

Most books out there right now discuss .NET in a general manner. There are more and more books on more specialized topics. Check Amazon.com or Chapters.ca.
 

HJB417

Senior member
Dec 31, 2000
763
0
0
network programming w/ .net eh
well, system.net has the .net specific classes which kinda simplify some of the basic network procedures but if you've never done networking before, I think you should try using sockets instead of tcp/udp client class. system.net.sockets

Make sure you know the different socket types (blocking, non-blocking, asynch) and you'll probably need the system.text's ASCIIEncoding class to convert strings and chars to Byte arrays (char* arrays). When I get back to school tomorrow, I'll post some .NET specific websites. Most code is in c#, with vb.net coming in 2nd and c++ coming in third =(. Off the top of my head, try www.dotnet247.com, www.codeproject.com, www.gotdotnet.com and there are a few more .NET sites. Make sure you know how delegates and events work, I think they are crucial.

Make sure you know the properties of the network functions. like, send() recv(), return the number of bytes sent/recv. You'll have to resend unsent data. But when you use a networkstream, send doesn't return an int but it will probably set canwrite to false when the buffer is full. Try to send a decent amount of data per function call. sending 8192 bytes per function call is pretty standard but don't be ghetto and send 1 byte 8192 times. Fool around with the socket options if you need to. Most of all, have fun =)