Именованные каналы. Работа каналов по сети.
Скажите пожалуйста.
Создаю проект работы именованных каналов по сети. И застрял на одном моменте.
При попытке подключения клиента к серверу канала по сети, клиент не может подключиться.
Нашол Дельфефский вариант. Там якобы создается дескриптор безопасности. Но никак не могу вникнуть как его создать на С++... Помогите пожалуйста кто знает.
P. S.
И скажите еще пожалуйста. Для чего вообще Используются Именованные каналы?
Мне и еще одному парню дали курсовые, у него анонимные каналы а у меня именованные. одинаковая задача. т.е. межпроцессорное взаимнодействие с помощью именованных каналов... Я конечно понимаю что анонимные каналы используются внутри системы... но для чего использовать именованные каналы внутри системы никак не могу понять...
У именованных каналов же как бы доминирует межсетевое взаимодействие.. и передача данных по сети...
Та же проблема:
MSDN: Anonymous Pipe Operations:
Anonymous Pipes
An anonymous pipe is an unnamed, one-way pipe that typically transfers data between a parent process and a child process. Anonymous pipes are always local; they cannot be used for communication over a network.
...
Anonymous Pipe Operations
The CreatePipe function creates an anonymous pipe and returns two handles: a read handle to the pipe and a write handle to the pipe. The read handle has read-only access to the pipe, and the write handle has write-only access to the pipe. To communicate using the pipe, [color=red]the pipe server must pass a pipe handle to another process. Usually, this is done through inheritance[/color]; that is, the process allows the handle to be inherited by a child process. The [color=blue]process can also duplicate a pipe handle[/color] using the DuplicateHandle function [color=blue]and send it to an unrelated process[/color] using some form of interprocess communication, such as DDE or shared memory.
...
Named Pipes
A named pipe is a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients. All instances of a named pipe share the same pipe name, but each instance has its own buffers and handles, and provides a separate conduit for client/server communication. [color=blue]The use of instances enables multiple pipe clients to use the same named pipe simultaneously[/color].
...
Цитата:
Anonymous Pipes
An anonymous pipe is an unnamed, one-way pipe that typically transfers data between a parent process and a child process. Anonymous pipes are always local; they cannot be used for communication over a network.
...
Anonymous Pipe Operations
The CreatePipe function creates an anonymous pipe and returns two handles: a read handle to the pipe and a write handle to the pipe. The read handle has read-only access to the pipe, and the write handle has write-only access to the pipe. To communicate using the pipe, [color=red]the pipe server must pass a pipe handle to another process. Usually, this is done through inheritance[/color]; that is, the process allows the handle to be inherited by a child process. The [color=blue]process can also duplicate a pipe handle[/color] using the DuplicateHandle function [color=blue]and send it to an unrelated process[/color] using some form of interprocess communication, such as DDE or shared memory.
...
Цитата:
Named Pipes
A named pipe is a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients. All instances of a named pipe share the same pipe name, but each instance has its own buffers and handles, and provides a separate conduit for client/server communication. [color=blue]The use of instances enables multiple pipe clients to use the same named pipe simultaneously[/color].
...