Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Send Msg To Specific Tcp Client from Tcp Server Python

171 views
Skip to first unread message

Anil reddy reddy M

unread,
Aug 11, 2016, 12:46:47 AM8/11/16
to
I was written a simple tcp server in python, which is nicely communicating with multiple tcp clients. My Tcp Server can accept multiple clients at time, each client as a new thread. I want send message to specific tcp client after some time.
I can client Address from connction, addr = socket.accept(), but i am not able send msg to client with client IP.POrT. I would be thankfull for any help i get



dieter

unread,
Aug 11, 2016, 2:06:47 AM8/11/16
to
Anil reddy reddy M <anilre...@gmail.com> writes:

> I was written a simple tcp server in python, which is nicely communicating with multiple tcp clients. My Tcp Server can accept multiple clients at time, each client as a new thread. I want send message to specific tcp client after some time.
> I can client Address from connction, addr = socket.accept(), but i am not able send msg to client with client IP.POrT. I would be thankfull for any help i get

TCP channels are bidirectional: you can send messages in both
directions. Thus, writing to the server's socket (for a specific client)
sends the written data to the client.

Anil reddy reddy M

unread,
Aug 11, 2016, 2:44:17 AM8/11/16
to
Hi,
Thanks for your reply, But how can i find client socketfd when i want send message to specific client.I can store connected client ip, port in database. how can use that ip, port when i want send.

Sincerely
Anil,
0 new messages