1834908 Members
2598 Online
110071 Solutions
New Discussion

What is a socket?

 
SOLVED
Go to solution
Verónica Muñoz Segovia
Frequent Advisor

What is a socket?

Who could provide me, what is the concept of socket? I'm a little loss about that.

What is the impact on a HP-UX 10.20 that is using sockets?

I'm doing a system performance study and I would like to define the impact on my system that is using a lot of sockets?

Best Regards,

Veronica.
Always is important to know the opinion of other people with or without experience
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: What is a socket?

Veronica:

See this thread for a brief overview of "what is a socket" and some good references to programming sockets. This should get you started!

...JRF...
James R. Ferguson
Acclaimed Contributor
Solution

Re: What is a socket?

Veronica:

See this thread for a brief overview of "what is a socket" and some good references to programming sockets. This should get you started!

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xfd096d96588ad4118fef0090279cd0f9,00.html

...JRF...
RikTytgat
Honored Contributor

Re: What is a socket?

Hi,

A socket is one end of a network connection.

One socket equals one open file on HP-UX. The only kernel resource it uses is an entry in the open file table.

The activity on a socket uses system resources too, just like reading from and writing to a file does.

For a good description of what a socket is, I'd like to refer to 'Unix Network Programming' by Richard W Stevens (ISBN 0-13-949876-1).

Hope this helps,
Rik.
Verónica Muñoz Segovia
Frequent Advisor

Re: What is a socket?

Thanks for the info and reference!

Veronica
Always is important to know the opinion of other people with or without experience
Verónica Muñoz Segovia
Frequent Advisor

Re: What is a socket?

Just to complete my question who can tell me what are the advantages and disadvantages when we use sockets?

Thanks in advance.
Always is important to know the opinion of other people with or without experience
James R. Ferguson
Acclaimed Contributor

Re: What is a socket?

Veronica:

In answer to your last question: TCP/IP sockets are a de facto standard which many, many people understand how to program and use. One advantage to using them is that many different operating systems support the paradigm, and therefore can interoperate with one another.

As for performance impact, this is a relative issue. Properly programmed, a TCP/IP socket interface is a very efficient way to exchange data. Like anything, a poorly written socket application can certainly have adverse affects on system performance.

...JRF...
Alan Riggs
Honored Contributor

Re: What is a socket?

Advantages: use of well-defined network protocols, portability, consistency across operating environment.

Disadvantages: possible security issues with well-defined network protocols. (probably overridden by the plethora of networking and security resources available to detect/prevent problems.)

Basically, if you want a client-server program to be network aware you need to have some means for it to talk across the wire. Sockets are the way that happens in the TCP (or OSI) networking model. If you choose to use something else, you have a much more difficult job ahead of you in creating and maintaining the necessary communications protocols. You also make your code much more difficult to port.
Verónica Muñoz Segovia
Frequent Advisor

Re: What is a socket?

I'm a lucky girl I had very good answers.

Thanks to all.

Veronica.
Always is important to know the opinion of other people with or without experience
James R. Ferguson
Acclaimed Contributor

Re: What is a socket?

Veronica:

I'm glad we could help! Thank you for expressing your appreciation so warmly.

Regards, Jim.

...JRF...