Re: SOCKET

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Smith (someone_at_some.where.inter.net)
Date: 08/02/04


Date: Mon, 2 Aug 2004 13:46:21 +0200

This is not entirely correct - I have come across problems communicating
over socket interface when no NIC is installed even when addressing the
'localhost' interface. My advice is - since many motherboards come with an
on-board network port and/or NICs are so cheap - "splurge" on a NIC.
Furthermore, since you are using sockets I assume you might want to actually
communicate across the network sometime - otherwise, you can use shared
memory/pipes/etc. for communicating between processes in the same host -
TCP/IP stack (socket) is an overkill for this...

"David Mair" <mairdanot@nothotmail.com> wrote in message
news:e7V68NBeEHA.3864@TK2MSFTNGP10.phx.gbl...
> Dave wrote:
>
> > Hi,
> > Can I use Winsock to communicate between two process on the same
computer
> > but without network card???
>
> You don't need a network card to install a Microsoft Loopback adapter
> then you have a local NIC driver without a NIC. At that point you could
> simply use WinSock as documented and connect to localhost (better) or
> the assigned IP address on the Loopback adapter. I mention this method
> only because I suspect (but don't actually know) that the IP stack is
> only loaded when bound to at least one NIC driver. If that isn't true
> then you only need to use WinSock with localhost as the source and target.
>
> FWIW, if you know you will only be communicating between processes on a
> single host then you can do lots of things other than sockets. Windows
> has shared memory, named pipes, Windows messages, COM, etc that can be
> used for inter-process communication.



Relevant Pages

  • Re: Historical question
    ... Why was it decided that NICs don't have ... >Another use would be for sniffing traffic by doing cat on the socket. ... for 'protocol' identifier. ... Also, by standard implementation, filesystem resources are 'shared access' ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Problem connecting to a multihomed system
    ... if you have a listening socket, a bindto a ip-address is always required. ... Connection to this Socket is then possible though this NIC. ... It's possible to bind a server socket to INADDR_ANY and some port - on multihomed host this means that app will be listening on all NICs. ...
    (microsoft.public.win32.programmer.networks)
  • Re: bpf packet capture and SOCK_STREAM socket redirects...
    ... >2) bpf on is capturing these packets ... >and as this is a tcp socket it'll take care of it from there ... and why 2 nics? ... you need to define a little more of the picture.. ...
    (freebsd-net)
  • IPv6, sending packets through a specific NIC
    ... I am new to linux and socket programming, ... the packets are only sent *some* of the time... ... the packets appear to be sent from linbox1 (by the return val ... The code above works because the NICs can rationalise which ...
    (comp.os.linux.development.apps)
  • Sorry - 1 more point
    ... "Tom Dyess" wrote in message ... >> socket connection for all threads. ... Sorry, one more point, I will be communicating with the socket like this ... public synchronized void loadNewsgroups() { ...
    (comp.lang.java.programmer)