I was wondering how many connections in parallel can one web socket handle?
what i mean is if i made a chat socket and a million user connected to it at the same time, will it affect it in anyway? and if yes, what is the maximum number of connections can one socket handle? and is there anyway to make one web socket handle the maximum traffic possible??

i made a research on the internet but there seems like nothing that can help me.

A socket has a number of concepts and depending on how you create it, it will behave differently.
If you mean a socket in the sense of the PHP socket functions, then one TCP socket will handle exactly one data stream to another host.

I am pretty sure though that you are looking for something different. So the interesting thing is: "what do you mean by a web socket?"

I am pretty sure though that you are looking for something different. So the interesting thing is: "what do you mean by a web socket?"

okay.. what i mean is:
lets assume i am making a user to user chat system using sockets... each of the users is having a connection to the same server but with different data being sent to the server.. the server is serving both users with the same port (lets say 5000).. now what will go wrong here?? and is this even possible?? i have tried it with ajax and jQuery but i am wondering if php socket servers can help making this... and i have looked on google about a user to user socket tutorial and i couldnt get anything useful...

my question have many different things inside it but lets start by how many users can connect to a socket server using the same port?

I am not sure whether I am on the same line but number of simultaneous connections probaly depends on the web server you are using and how it is configured. If you are using Apache maybe this is the starting point:

http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients

Interestingly there is a Web socket protocol but I am completely unfamiliar with it and can be of no help :-)

http://en.wikipedia.org/wiki/WebSocket

otocol but I am completely unfamiliar with it and can be of no he

thanks for your reply.. i am now checking the links and i hope that helps.. thanks again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.