in reply to Re: Sock-Server and Sock-Client
in thread Sock-Server and Sock-Client

My first problem is this:
how do i write back to the client from the server, which is running indefenitely?
And Yes, the server listens to only one client...

Replies are listed 'Best First'.
Re: Re: Re: Sock-Server and Sock-Client
by castaway (Parson) on Apr 17, 2003 at 06:48 UTC
    You just print to the socket you accepted. It's two-way.. So in your example, that would be:
    print $new_sock "Hallo!\n";
    I'm not sure what you mean by only listening to one client, I meant one IP/Port pair.

    C.

      hi,
      I'm able to write to the server once the client is established the connection,
      but i'm not able to tell the client something from the server...I suppose the client also should be listening indefenitely to the server right?
      If not, plz. advice...
      Thanks.
        Can you show your complete code again, for Server and Client? A Server listens, the Client connects and stays connected, it doesn't need to listen. What happens when you try to print something to the client socket? A little debug output and code would be helpful here.

        C.