Networking Forums

Networking Forums > Computer Networking > Linux Networking > reading port x -> writing port y

Reply
Thread Tools Display Modes

reading port x -> writing port y

 
 
steph
Guest
Posts: n/a

 
      03-04-2011, 07:39 AM
Hello,
Maybe this is a bit of a dummy question ...
What's the easiest way in linux to set up reading at one port and
making the data available at another port. Sort of reading data from
port x and writing them to port y.
Thanks,
Stephan
 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      03-06-2011, 01:03 AM
On Mar 4, 12:39*am, steph <stepha...@yahoo.de> wrote:
> Hello,
> Maybe this is a bit of a dummy question ...
> What's the easiest way in linux to set up reading at one port and
> making the data available at another port. Sort of reading data from
> port x and writing them to port y.
> Thanks,
> Stephan


TCP on both sides? Is this unidirectional or bidirectional? The
simplest way would be to write a program that listens on whatever port
the connection originates on and then copies the data between the two
ports. If the connection must be bidirectional, you can 'fork' and use
one process to copy in each direction. If you need to handle more than
one connection at a time or performance is critical, it's probably
worth the effort to use splice(2) or epoll(4).

DS
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How many NIC for a event photography viewing system, advantages ofQuad Port (4-port) NICs sam Windows Networking 1 03-17-2008 12:51 PM
Socket connection to port fails despite port open / listening ! Jack Linux Networking 2 12-19-2007 03:46 PM
Reading\Writing to Networked External Hard Drive neil154 Windows Networking 4 09-21-2007 12:46 AM
open ports on the router port 1900udp and port 5643 tcp James Broadband Hardware 0 02-20-2005 08:07 AM
What is the difference between a multi-port ASDL modem/router and one with a 4 port hub? Tim Lyons Broadband 4 02-27-2004 06:07 AM



1 2 3 4 5 6 7 8 9 10 11