-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use it ? #11
Comments
I readed the StreamAPI test unit, but there's no docs, I guess I have to use tap.pipe()/unpipe() and push/unshift, but how ? |
if you have another Stream, use pipe() Docs will be improved, Thanks! |
More specified examples will be posted soon. |
thanks I will try it :) |
It worked, using to machin on different network, and net library, both are connecting, and I can ping each other with the specified ipv4 client (under net.connect):
server (same, using net.connect):
|
Is there fixed rule: one call to |
I think the answer is no. This is implemented under Stream API of Node.js. So I guess it is not promised behavior. |
If so, can I send the write method twice to pass the datagram halves? How will tuntap2 know to glue it together and upload it to the network as signle frame? I found simple Tun/Tap tutorial with simple example named "Tunells" which mappipng Tun/Tap device to TCP stream. Simple VPN. This example presents the same problem as tuntap2 - mapping sending and receiving a packet through a stream. They solved the problem by wrapping the packet or datagram with a header containing its size.
I have a suspicion that |
I think it doesn't change anything about the behavior of the Node API. The tun/tap APIs in linux could just create a file descriptor and it could be used as a normal file on disk. So we just |
1 similar comment
I think it doesn't change anything about the behavior of the Node API. The tun/tap APIs in linux could just create a file descriptor and it could be used as a normal file on disk. So we just |
I created the tap
now how can I push input and read output ?
in example, if I have a serveur and a client, I've create a server, and both script can connect, now I can read data from one tap, and send it to the other ?
The text was updated successfully, but these errors were encountered: