Jump to content

Talk:Network socket: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Line 53: Line 53:
::A socket can be a UDP socket, or a raw IP socket, therefore not connected to another end-point. In this case it will only have a local address and a protocol, but is is still a socket. Also analogy to electronic socket, being an end-point, either connected to another point or not, makes the network socket concept very clear. In my mind, it shall be emphasized that having a remote address is a special case of a socket usage. [[User:Ronny Weisman|Ronny Weisman]] ([[User talk:Ronny Weisman|talk]]) 16:50, 22 January 2015 (UTC)
::A socket can be a UDP socket, or a raw IP socket, therefore not connected to another end-point. In this case it will only have a local address and a protocol, but is is still a socket. Also analogy to electronic socket, being an end-point, either connected to another point or not, makes the network socket concept very clear. In my mind, it shall be emphasized that having a remote address is a special case of a socket usage. [[User:Ronny Weisman|Ronny Weisman]] ([[User talk:Ronny Weisman|talk]]) 16:50, 22 January 2015 (UTC)
:::The problem is that after [[Special:Diff/643385160|your edit]] the ''protocol'' point started by mentioning TCP which gives a strong suggestion it is talking about TCP sockets. The current text (from before your edit) notes "{{tq|Only for established TCP sockets.}}" for the ''Remote socket address''. If some improvement were warranted, I think it would involve splitting the text into two parts to avoid clumsy expressions—some sockets have five numbers, and some have three. By the way, you might like to review [[WP:TP]] about indenting replies—I put two colons in front of your last comment, and three in front of this comment. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 00:54, 23 January 2015 (UTC)
:::The problem is that after [[Special:Diff/643385160|your edit]] the ''protocol'' point started by mentioning TCP which gives a strong suggestion it is talking about TCP sockets. The current text (from before your edit) notes "{{tq|Only for established TCP sockets.}}" for the ''Remote socket address''. If some improvement were warranted, I think it would involve splitting the text into two parts to avoid clumsy expressions—some sockets have five numbers, and some have three. By the way, you might like to review [[WP:TP]] about indenting replies—I put two colons in front of your last comment, and three in front of this comment. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 00:54, 23 January 2015 (UTC)
::::I agree, the 2nd sub-section that I suggest to rephrase shall better start with: "A socket that has been connected to another socket, e.g. during the establishment of a TCP connection..." removing the TCP from the start of the sentence. What do you say? [[User:Ronny Weisman|Ronny Weisman]] ([[User talk:Ronny Weisman|talk]]) 13:57, 26 January 2015 (UTC)

Revision as of 13:57, 26 January 2015

WikiProject iconComputing: Networking Start‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
Taskforce icon
This article is supported by Networking task force (assessed as Mid-importance).

Template:Findsourcesnotice

Suggested merge

I suggest that Ip socket be merged into this article. It appears to be a stub covering the same subject. I plan to complete this merge by 2006-09-08 if there is no objection and/or a consensus is reached. -- Ratarsed 11:46, 29 August 2006 (UTC)[reply]

Done -- Ratarsed 18:46, 12 September 2006 (UTC)[reply]

If this article is about IP sockets then the comment about SNA should be moved elsewhere. SNA only runs over DLSw on the Internet as it as its own lower level protocol. In addition there is not a clear definition here of a socket. Does it include the API? The queue? If there are multiple definitions they should be clearly identified and listed. The higher level definition of "socket" is in error by including "an end-point of a bi-directional communication link in the Berkeley sockets API". Pointing to a parent entity is not a valid definition. User:jbottoms76

Request

Could someone go over the process an application might take in creating a socket -I'm interested in how port numbers are assigned in particular User:DragonSlayre12:14pm, 9 September 2007 (New Zealand time). —Preceding unsigned comment added by 124.197.57.56 (talk) 00:16, 9 September 2007 (UTC)[reply]

Missing references: The article does not refer to any API standard. There are some de facto standards for Berkely Sockets and WinSock.

Citations to RCF/STD are needed. For Example, RFC3493, R. Gilligan et al., “Basic Socket Interface Extensions for IPv6,” February 2003, http://www.rfc-editor.org/ discusses difference between v.4 and v.6 versions of the library. —Preceding unsigned comment added by 67.173.186.180 (talk) 04:22, 7 February 2010 (UTC)[reply]

Article Quality

This seems more like a Java tutorial on socket programming as opposed to an article in an encyclopaedia. --121.45.19.162 01:17, 9 November 2007 (UTC)[reply]

Where did that Java code come from?--Adoniscik 04:45, 13 November 2007 (UTC)[reply]

Obviously, this article was extracted from a book or tutorial: "It also draws on other skills, such as multi-threaded programming, discussed in the next chapter. For now, we'll focus on a simple, bare-bones TCP server that executes as a single-threaded application" o.O "next chapter"??? :O --200.17.143.33 16:32, 14 November 2007 (UTC)[reply]

Should we rephrase this?

Hi, in the phrase "The server creates one socket for each client, and these sockets share the same local socket address."

Would it be more appropriate to write "The server creates one socket for each client, and these sockets share the same local IP address."?

Because if I understood correctly, the socket address is composed by IP:PORT, the server will create a new socket for each client, say, 10.0.0.1:10000, 10.0.0.1:10002, etc. This way the sockets created on the server would share the same IP address, but their socket addresses would be different.

Anyone agrees? — Preceding unsigned comment added by Bnegrao2 (talkcontribs) 20:37, 19 January 2013 (UTC)[reply]

Suggestion for rephrasing in the Overview section

I find the description at the beginning of the Overview section a bit confusing: "An Internet socket is characterized by a unique combination of the following :

  • Local socket address: ...
  • Remote socket address: ...
  • Protocol..."

The reason I find it confusing is that it does not distinct well enough between the natural characteristics of any socket, being an end point, meaning having local socket address and protocol, and the special case when a socket is connected to a remote end-point, in which case it has the knowledge of the remote socket address.

Therefore, I would like to suggest the following rephrasing of the first 2 sub-sections of the overview section:

"An Internet socket is characterized by the following:

  • Local socket address: Local IP address and port number,
  • Protocol: A transport protocol (e.g., TCP, UDP, raw IP, or others). TCP port 53 and UDP port 53 are consequently different, distinct sockets.

A TCP socket that has been connected to another socket, e.g. during the establishment of a TCP connection, will also be characterized by a remote socket address. As discussed in the client-server section below, this is necessary since a TCP server may serve several clients concurrently. The server creates one socket for each client, and these sockets share the same local socket address from the point of view of the TCP server."

Any thoughts? Ronny Weisman (talk) 07:43, 21 January 2015 (UTC)[reply]

I think the underlying problem is the vagueness of the term "socket". However, whatever theoretical meaning the term may have with regard to being an endpoint, the overview is correct in that a socket is identified by (protocol + local IP:port + remote IP:port). Indeed, the netstat command mentioned shows exactly that information. Before a connection is established, a host may listen on (protocol + local IP:port), and people call that a socket—but is it? If emphasis is to be given, it should be to show a working socket (five numbers). We could resort to finding what reliable sources say, but terms like this are often used ambiguously. Johnuniq (talk) 08:51, 21 January 2015 (UTC)[reply]
A socket can be a UDP socket, or a raw IP socket, therefore not connected to another end-point. In this case it will only have a local address and a protocol, but is is still a socket. Also analogy to electronic socket, being an end-point, either connected to another point or not, makes the network socket concept very clear. In my mind, it shall be emphasized that having a remote address is a special case of a socket usage. Ronny Weisman (talk) 16:50, 22 January 2015 (UTC)[reply]
The problem is that after your edit the protocol point started by mentioning TCP which gives a strong suggestion it is talking about TCP sockets. The current text (from before your edit) notes "Only for established TCP sockets." for the Remote socket address. If some improvement were warranted, I think it would involve splitting the text into two parts to avoid clumsy expressions—some sockets have five numbers, and some have three. By the way, you might like to review WP:TP about indenting replies—I put two colons in front of your last comment, and three in front of this comment. Johnuniq (talk) 00:54, 23 January 2015 (UTC)[reply]
I agree, the 2nd sub-section that I suggest to rephrase shall better start with: "A socket that has been connected to another socket, e.g. during the establishment of a TCP connection..." removing the TCP from the start of the sentence. What do you say? Ronny Weisman (talk) 13:57, 26 January 2015 (UTC)[reply]