473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

inter threading info

Hi All,

Q: Is it possible for a thread on SocketServer.ThreadingTCPServer to get
the socket info of *other* open thread/s and use that info to send data
to the accepting client?

I wrote a socketserver using SocketServer.ThreadingTCPServer. A client
is connected to the server and expects multiple request/responses. (Not
sure about the terminology but the client connects and then stay
connected for a while.)

I need to create a client that can connect to server and then determine
how many other clients are connected, what the socket info is
(ifile/ofile) and then send and receive specific data to those clients.

TIA
T
Jul 18 '05 #1
1 1412
Tertius Cronje wrote:
Q: Is it possible for a thread on SocketServer.ThreadingTCPServer to get
the socket info of *other* open thread/s and use that info to send data
to the accepting client?
A specific socket can be used from every thread of a process. Just make
sure that you synchronize everything.
I need to create a client that can connect to server and then determine
how many other clients are connected, what the socket info is
When you accept a socket client, a new socket is created, so you cannot
determine how many clients are connected to a socket. You have to create
a data structure where you insert info about accepted connections and
delete the info when a connection is closed.
(ifile/ofile) and then send and receive specific data to those clients.


ifile/ofile are local to the server process so you cannot use them to
send data from one client to another client. You have to send the data
to the server first with a special tag, the server has to use that tag
and send the data to the designated other client.

It sounds a bit as if you want to build some kind of chat server and now
you want to add private channels.

Daniel

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: A.M | last post by:
Hi, What is the best way to implemet Inter Process Communication in .NET ? I developed two programs and I want to have them talk to each other. Thanks, Alan
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
0
by: Pawan Narula via DotNetMonster.com | last post by:
hi all, i'm using VB.NET and trying to code for contact management in a tree. all my contacts r saved in a text file and my C dll reads them one by one and sends to VB callback in a sync mode...
4
by: Giovanni | last post by:
Hi All, I need help with the following: Using VB.NET 2005, I am building a custom class in a separate assembly. The purpose of this class is to poll the internet to determine connectivity. I...
6
by: les | last post by:
Here's a class which uses 2.0 generics to implement an inter-thread message queue in C#. Any number of threads can post and read from the queue simultaneously, and the message object can be any...
0
by: PiotrKolodziej | last post by:
Hi I have a simple situation, and complicated for me problem. I have an event that is raised if data receive to RS port. This event calls few api functions Here is the code: case "Alt": { if...
4
by: rh0dium | last post by:
Hi all, I have a problem with putting a job in the background. Here is my (ugly) script which I am having problems getting to background. There are threads about doing python script.py & ...
2
by: akameswaran | last post by:
Admittedly this problem causes no actual functional issues aside from an occasional error message when the program exits. The error is: Unhandled exception in thread started by Error in...
4
by: Astley Le Jasper | last post by:
I have an application that put on an old machine with a fresh Xubuntu installation (with Python 2.5). But I can't get the threading to work The application was written on a combination of Windows...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.