Tag Info

Hot answers tagged

53

S is a server: let's say it's an HTTP server, so it'll use the well-known port number for HTTP, which is 80. I run it on a host with IP address 10.0.0.4, so it will be listening for connections on 10.0.0.4:80 (because that's where everyone will expect to find it). Inside S, I'm going to create a socket and bind it to that address: now, the OS knows that ...


35

A port is part of the address in the TCP and UDP protocols. It is used to help the OS identify which application should get the data that is received. An OS has to support ports to support TCP and UDP because ports are an intrinsic part of TCP and UDP. A socket is part of the interface the OS presents to applications to allow them to send and receive ...


34

Well at the risk of sounding slightly cheesy: Ideas are timeless. By this I mean that the notion of a depth first search is goodness knows how old, but still totally relevant. Likewise, things that aren't totally platform and technology dependent tend to have a longer lifespan. If you learn things like Algorithms Data structures Paradigms and Concepts ...


32

Think of your machine as an apartment building: A port is an apartment number. A socket is the door of an apartment. An IP address is the street address of the building.


20

IP addresses are a 32 bit integer which we typically express as four octets for human purposes. You could get the number of addresses in a range by turning both into their 32 bit integer representations and subtracting.


18

That sounds like UDP hole punching Let A and B be the two hosts, each in its own private network; N1 and N2 are the two NAT devices; S is a public server with a well-known globally reachable IP address. A and B each begin a UDP conversation with S; the NAT devices N1 and N2 create UDP translation states and assign temporary external port numbers ...


16

Socket programming (at least as the term is normally used) is programming to one specific network API. Sockets support IP-based protocols (primarily TCP and UDP)1. Network programming can be done using various other APIs. Windows has a number of protocol-independent APIs such as the WNet* and Net* functions. Older versions of Windows also used ...


15

This scenario of "nuclear apocalypse by inadvertence" would require some inordinate incompetence at some point. Namely, we can imagine a buggy router which mixes some packets together, and sends the wrong packet to the wrong destination. And then, inexplicably, the military system which receives the packet which, by a stroke of bad luck, contains what that ...


13

imagine you have a drum. If you beat it 10 times a second that would give you the transmission rate. You can hear it from a hundred meters away in about a second (speed of sound) which is the propogation speed. Edit: 10 times a second being 10 bits of information send. You can beat faster, increasing the transmission rate, but you can't increase the speed ...


13

I think Windows required applications to poll for IO until NT and Windows 95. Modern general purpose operating systems have pretty much eliminated the need for polling. When your application requests to read from a socket, the read function has to make a call to operating system kernel. The OS puts the calling thread into a suspended state. As network ...


12

Many businesses in the 60's and 70's used what was called "time-sharing" of remote computer resources. 1) The input was sent by a teletype machine which would send the inputs to the remote machine and the display was printed paper. 2) The program would run and the results would return on the teletype machine. Often the mainframe computer was thousands of ...


11

You can't "network to get a job," it's impossible to do well, and it's a big turn-off to have someone get to know you and lose interest when you can't help them get a position at your company. Networking is like farming. You plant seeds, cultivate and weed consistently, and harvest at the right time. What you should do now is what you should always be ...


11

You won't be able to get an accurate count without any information about whether the range crosses subnet boundaries and what those subnets are. For example, 10.10.7.0 - 10.10.8.255 is a contiguous range of 512 addresses in the context of a /16. If that range covers two /24 blocks, the count is 508 because each block has a network address and a broadcast ...


10

Theoretically, this depends on the specifics of the OS and network hardware. In practice, mainstream OSes and hardware use a push model based on interrupts for interaction between the hardware and the OS (and all the software controlled by the OS). Basically, an interrupt is a very, very low-level mechanism through which peripheral hardware can signal the ...


10

UDP packets are not guaranteed to arrive in order. You should use TCP for this.


9

Request-response vs. message pushing Some architectures and protocols were designed for request-response type of communication. In HTTP, the client asks the server to GET, POST, DELETE, HEAD etc. something, and the server responds (or fails to respond). In POP3, the server role is limited to answer the requests, nothing more. Some others are designed in a ...


9

An open TCP connection is a logical state. It does not imply that that data is always being sent back and forth. After the initial three-way handshake you've entered into the "connected" state. You're in that state until either a 3-way disconnect occurs or a keep-alive fails. During the lifetime of the connection, resources from the underlying "physical" ...


8

someone told me that on networking,,,, money is easy, the job is easy, some told me... Choosing a career path by this method is a sure fire way to end up doing something that you don't enjoy. programming is best suit for me beacuse i'm very skilled and excellent at figures (sorry if it sounds like boasting).... Programming requires much more than ...


8

Basically, there wasn't a network. To do anything useful, you had to be co-located with the computer. So you took your cards to the ops centre, and put them in a box. The operators then loaded them into the card reader. Results were printed on paper or punched out on cards, and you once again went to the ops centre to pick them up. Later on, things like ...


8

The old netchan was too intricate. The problem is to find a way to provide Go channel semantics on top of network hardware and software that, as always, finds a way to defeat all attempts at clean design. I will continue to ponder. -rob new netchan


8

I think it is definitely not OK to synchornize the clock in the system. User does not expect you to touch the system settings and many systems won't even let you to. All you need is to have a correlation to convert timestamp from one side's clock to the other side's clock. On the other hand you need this correlation to be rather precise, say at least to a ...


7

Many programmers are introverts, so yes I would say it is typical for developers. I would continue to go to the user group meetings. Networking takes work, and even if you're meeting 1 or 2 people a month, eventually that adds up. I would also go to events like code camps as well. And yes, bring a stack of business cards and introduce yourself. ...


7

OK, I am not a Ethernet hardware engineer, but I think I can take a stab at your question. When you write code to listen from a port, the following happens: Your application code blocks/sleeps/"selects"/polls until the OS signals that a packet has arrived (with an some bits in the IP header indicating that packet is associated with that particular "port" ...


6

I would see if you can find a local users group and if so go to the meetings. Often people will go out for a beer or ice cream afterwards and you can get to know folks. Around here (Tel Aviv) there are a few good user groups (israel.pm, Sayeret Lambda etc) They may well be where you live too, and if not try to get one started.


6

Network terminology and concepts should be fairly OS agnostic. Though linux may help you get a better understanding of network concepts, this will probably be due to the fact that you will have to have some basic networking knowledge to set up a linux server (depending on the distribution). So basically, no, you dont need to use linux to learn networking ...


6

"network programming" will require some networking technology - for example, RPC. Sockets (most likely you mean BSD sockets) are an example of such technology. So "socket programming" is a subset of "network programming".


6

You need to analyze your code looking for "turnarounds". A turnaround is a case where forward progress is blocked until data can be received from the other side. Each turnaround adds a penalty to performance that scales with the latency. So if you have 12 turnarounds, 100ms more latency means 1.2 seconds of wait. If you can drop the turnarounds to 4, 100ms ...


6

Simple : It gets thrown away. If either TCP, or network layer can't accept the packet, then it is thrown away. This might happen if port is not open or packet was re-send, but original packet arrived, so it is not necessary anymore. TCP and most network system contains rigorous checks on what packets to accept and what packet are bad or corrupted in some ...


6

If high latency is screwing up performance, I'd do the exact opposite of what you're suggesting: find ways to combine multiple requests into a single request. Let's say latency is 1 second, and you need to process 100 items, and the actual processing time is 0.01 seconds per item. 100 requests ============ Processing time = 0.01 * 100 = 1 second Latency ...


6

If they're smart, they will say to you "We are happy to get suggestions for product improvements from the user community, but we cannot accept code submissions from the public." It is highly likely that they have a policy of writing every single line of code for their products in-house, to prevent any possibility of being accused of stealing your code, or ...



Only top voted, non community-wiki answers of a minimum length are eligible