473,395 Members | 1,968 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,395 software developers and data experts.

Concurrent Connections

Hi,

I have Server application which handles a single conenction froma client.
I want this program to accept concurrent connections.

Anyone help me out ?

I am using a TcpListener object. I thought that this would accept concurrent
connections, but apparently not, sicne I have my server running and connect
using 2 sessions of telnet and only seems to register one connection.

Any help on this is appreciated

--
Steven
www.stevenblair.com
Nov 15 '05 #1
2 2477
Whenever your server accept a connection, a new thread should be spawned
off and further interaction with that connection should take place in
that thread. Then your server main thread go back to listening mode.
Steven Blair wrote:
Hi,

I have Server application which handles a single conenction froma client.
I want this program to accept concurrent connections.

Anyone help me out ?

I am using a TcpListener object. I thought that this would accept concurrent
connections, but apparently not, sicne I have my server running and connect
using 2 sessions of telnet and only seems to register one connection.

Any help on this is appreciated


Nov 15 '05 #2
Hi,

When the server accepts a connection, does a new thread automatically get
spawned or is the programmer responsible for this ?

Here is my code:

listener = new Socket
(AddressFamily.InterNetwork,SocketType.Stream,Prot ocolType.Tcp);

listener.Bind(new IPEndPoint(IPAddress.Any,5005));

listener.Listen(0);

listBox1.Items.Add("Listening...");

listener.Accept();

Thread thread = new Thread(new ThreadStart(ClientConnected));

thread.Start();

So I start a new thread after Accept method.

Any more help on this would be appreciated. The strange thign is, i can
connect 2 telnet sessions to the server, altho only recieve text from the
first instance.

Steven
www.stevenblair.com
"Jonathan" <da***********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Whenever your server accept a connection, a new thread should be spawned
off and further interaction with that connection should take place in
that thread. Then your server main thread go back to listening mode.
Steven Blair wrote:
Hi,

I have Server application which handles a single conenction froma client. I want this program to accept concurrent connections.

Anyone help me out ?

I am using a TcpListener object. I thought that this would accept concurrent connections, but apparently not, sicne I have my server running and connect using 2 sessions of telnet and only seems to register one connection.

Any help on this is appreciated

Nov 15 '05 #3

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

Similar topics

1
by: Sebastian | last post by:
Hi all ! Does someone know how many concurrent connections 2005 Express can accommodate ? The limit on MSDE was 5 before performance drops considerably. Thanks for your help. Sebastian
11
by: Durai | last post by:
Hi All, I tested "concurrent testing" in MySQL. It works fine. But I couldn't do in PostgreSQL 7.3.4 on HPUX IPF. I got deadlock problem. I used the PHP script to update table( one script...
1
by: Krysa | last post by:
Access 2K, DAO, split front end and back end; back end on server. Regarding max of 255 concurrent users. Is it really users, or connections? How would a user have more than one connection to same...
9
by: stephen | last post by:
Hello, I am using ASP.NET as a streaming engine for mp3 and ogg files over HTTP. Basically, the asp.net page sets it's mime content type to audio/mp3 and i write out the file to the stream. We will...
3
by: Animesh | last post by:
Hi All, I have a lexical analyzer in flex/bison associated with a lot of custom C function calls linking to external programs which uses quite a lot of global variables and data structures. The...
3
by: em | last post by:
hi, i can't make more than two concurrent requests to a php script - i mean when i make say 20 simultaneous requests then two first execute but 18 remaining are waiting for them, then the next two...
1
by: Jay Douglas | last post by:
Sorry for the cross post but I was hoping between developers and systems ppl I can get answer to this question. I've searched; found issues similar to mine but the solutions are not working. My...
3
by: zom | last post by:
I have a need to have three plus frames with concurrent connections to a web server, and all of them able to communicate with the parent page. To overcome the 2 concurrent connections limit I used...
0
by: contactme | last post by:
Hi, Is it possible to open concurrent connections using Net::IMAP::Simple library ? My IMAP server allows 4 connections per ip, so I am having following problems while using Net::IMAP::Simple and...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.