[Mono-list] Socket programming ....

Paulo Aboim Pinto esqueleto@tusofona.com
Mon, 10 Jan 2005 23:57:58 +0000


Tkx for the answer.

To write a client shouldn't we write a listener also? Let's see. How 
does the client receives comunications from the server.

Not all comunications are:

Client -> Question -> Server

and then the response from the server

Server -> Response -> Client 

For this type of communications the examples for TcpClient that i found 
are good, but, for example to comunicate with the NewsGroup Server we 
have to have a listener for INCOMING comunication that does not have 
Question from the client.

The client only will be listening for data from the server (Ex. 
Broakcast data sent by the server). 

This listener that i wrote is to receive this broadcast communication. 
Isn't this right?

tkx in advance
Paulo Aboim Pinto
Odivelas - Portugal

Michael J. Ryan wrote:

> you have written a listener, not a client...  a listener is for INCOMING
> connections, not outgoing...
>
> look into the System.Net.Sockets.TcpClient Class.. should give you 
> what you
> need.
>
> esqueleto@tusofona.com wrote:
>
>> Hello
>>
>> I'm trying to develop an application that use Sockets with Mono. Fist 
>> i'm
>> trying to develop a client that try to connect to a NewsGroup Server 
>> (this
>> is a client example).
>> --snip-- <
>>     _tcpListener = new System.Net.Sockets.TcpListener (_ip, 119);
>> --snip-- <
>> ** (<unknown>:24774): WARNING **: : Need to translate 99 [Cannot assign
>> requested address] into winsock error
>> ERROR: System call failed
>
>