> what am I doing wrong? thx in advance

You probably try to send a message using the socket that listen for
connections. That's wrong !
When a connection is made, a new socket is created to handle the connection.
Use that socket.

btw: There is a chat sample delivered with ICS.
--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: "Jasper Veeckman" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Thursday, May 05, 2005 5:15 PM
Subject: [twsocket] SocketServer send message ..


> hey,
>
> I'm coding a small chat program with sockets.  Server and client are the
same prog, u just have to choose what role u want to play. Server sets
socket in listening and client connects
>
> I want to be able to write messages from both sides, but only client side
works for now, when I want to send  a string from server to client I get and
error
>
> -- ERROR in SEND, socks not connected --
>
> made a function for the socket...
>
> procedure TForm1.WSocketOnDataAvailable(Sender: TObject; Error: Word);
> var
>   data : String;
> begin
>   data := TWSocket(Sender).ReceiveStr;
>   memo_text.Text := data;
> end;
>
> what am I doing wrong? thx in advance
>
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to