Connecting Tech Pros Worldwide Forums | Help | Site Map

WindowsXP-Vista, C# :: Difference between TcpListener.Server.Send and TcpClient.Send

Newbie
 
Join Date: Aug 2008
Posts: 9
#1: Sep 17 '08
When a TcpListener accepts a connection, it returns a TcpClient, which allows you to recieve data. But what about TcpListener.Server.Receive? Does that also allow to receive data in the same way? Or does the TcpClient returned only recieve data from that current connection while TcpListener.Server.Receive receives data from all connections? I do have mutliple connections in my TcpListener.

Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#2: Sep 17 '08

re: WindowsXP-Vista, C# :: Difference between TcpListener.Server.Send and TcpClient.Send


TcpListener.Server returns a reference to the unerlying Socket object. So TcpListener.Server.Receive() is just the Receive function on a Socket object.
TcpClient.Client is the same way.
Reply