简体   繁体   English

具有IP地址的命名管道连接

[英]named pipes connection with IP address

I have funny problem that I can connect to a remote named pipe using the machine name, but it would not work with the IP address. 我有一个有趣的问题,我可以使用计算机名称连接到远程命名管道,但不能与IP地址一起使用。 After reading the doc on pipe names at http://msdn.microsoft.com/en-us/library/aa365783(v=vs.85).aspx - there seems to be no indication of IP address. http://msdn.microsoft.com/zh-cn/library/aa365783(v=vs.85).aspx上阅读了有关管道名称的文档后,似乎没有IP地址的迹象。

Although, I know IP address work for pipe name (worked when I used Windows 2008R2, but didn't work when the pipe was created on Windows 2003). 虽然,我知道管道名称的IP地址有效(当我使用Windows 2008R2时有效,但是在Windows 2003上创建管道时无效)。

So are IP address supported? 那么是否支持IP地址? Are they supported on certain OS? 它们在某些操作系统上受支持吗? Firewall is off, and everything I can think of is setup OK considering the pipe works with the machine name.... 防火墙已关闭,考虑到管道可以使用机器名称,因此我能想到的一切都设置正确。

BTW. 顺便说一句。 I am using C++ unmanaged to work with the pipes. 我正在使用不受管理的C ++来处理管道。

Named Pipes operate at a different layer of the network protocol stack. 命名管道在网络协议堆栈的不同层上运行。 Named Pipes work only on the local network where Windows name services are available, and are not routed using TCP / IP. 命名管道仅在可使用Windows名称服务的本地网络上工作,并且不会使用TCP / IP进行路由。

When you thought you were creating a named pipe using an IP address, you may have been creating a pipe that used a ###.###.###.### as a pipe name instead of as a server name. 当您以为要使用IP地址创建命名管道时,可能是在创建使用###。###。###。###作为管道名称而不是服务器名称的管道。 CreateNamedPipe can only create a pipe on the local machine, not on a remote machine. CreateNamedPipe只能在本地计算机上创建管道,而不能在远程计算机上创建管道。 And it requires a "\\\\.\\" prefix on the front of the pipe name. 并且在管道名称的前面需要一个“ \\\\。\\”前缀。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM