• Home
  • Raw
  • Download

Lines Matching refs:sockets

13    misunderstood technologies around. This is a 10,000 foot overview of sockets.
22 I'm only going to talk about INET sockets, but they account for at least 99% of
23 the sockets in use. And I'll only talk about STREAM sockets - unless you really
27 work with blocking and non-blocking sockets. But I'll start by talking about
28 blocking sockets. You'll need to know how they work before dealing with
29 non-blocking sockets.
35 application (your browser, for example) uses "client" sockets exclusively; the
36 web server it's talking to uses both "server" sockets and "client" sockets.
43 sockets are by far the most popular. On any given platform, there are
45 cross-platform communication, sockets are about the only game in town.
48 like wildfire with the Internet. With good reason --- the combination of sockets
68 reply, and then be destroyed. That's right, destroyed. Client sockets
112 ``clientsocket``, or restructure this app to use non-blocking sockets, and
116 receive any data. It just produces "client" sockets. Each ``clientsocket`` is
131 If you do decide to use sockets, bind the "server" socket to ``'localhost'``. On
144 perhaps a signon. But that's a design decision - it's not a rule of sockets.
148 use ``read`` and ``write``. The latter is the way Java presents its sockets.
150 ``flush`` on sockets. These are buffered "files", and a common mistake is to
155 Now we come to the major stumbling block of sockets - ``send`` and ``recv`` operate
178 fundamental truth of sockets: *messages must either be fixed length* (yuck), *or
296 you're just being slow. *Please* ``close`` your sockets when you're done.
302 Probably the worst thing about using blocking sockets is what happens when the
319 know about the mechanics of using sockets. You'll still use the same calls, in
350 You pass ``select`` three lists: the first contains all sockets that you might
351 want to try reading; the second all the sockets you might want to try writing
358 In return, you will get three lists. They contain the sockets that are actually
376 sockets is one which has died a nasty death, the ``select`` will fail. You then
381 Actually, ``select`` can be handy even with blocking sockets. It's one way of
386 **Portability alert**: On Unix, ``select`` works both with the sockets and
387 files. Don't try this on Windows. On Windows, ``select`` works with sockets
390 very, very well) with my sockets. Face it, if you want any kind of performance,
397 There's no question that the fastest sockets code uses non-blocking sockets and
404 threading is the optimal solution, (and using non-blocking sockets will be
405 faster than using blocking sockets). Unfortunately, threading support in Unixes
413 Finally, remember that even though blocking sockets are somewhat slower than