Bloomberg LP Interview Question
Financial Software DevelopersCountry: United States
Interview Type: Phone Interview
The IP protocol (at least IPv4) provides for a 16-bit integer to represent the port. So you can listen on 65536 different ports. Some of these may be in use or reserved, so you may have fewer actual port availabilities.
I really don't know in what sort of context you're asking the second question. What sort of request?
When Client request for a connection then it is only the initiation of the connection requets and Synchronization packet SYN sent from client to Server.Once the Server recieves the SYN packet from the client,It also sends the SYN packet with an acknowledgement of the SYN packet sent from the client.Third step is client acknowledge the SYN packet of the server.So it is 3 way handshake.One these 3 way handshake happened,Connection is established.
Port & sockets are different. In linux its maximum number of file descriptors.
- d1val October 30, 2012Socket is a set of five [ SRC IP, Dest IP, SRC Port, Dest Port, Protocol ]
eg. A multi threaded server (web server) can listen to 1000's of socket on a single port. ( 80 )