How slow are TCP sockets compared to named pipes on Windows for localhost IPC?

It will be the same (or at least not measurably different). Winsock is smart enough to know if it’s talking to a socket on the same host and, in that case, it will short-circuit pretty much everything below IP and copy data directly buffer-to-buffer. In terms of named pipes vs. sockets, if you need to potentially be able to communicate to different machines ever in the future, choose sockets. If you know for a fact that you’ll never need to do that, pick whichever one your developers are most familiar or most comfortable with.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)