HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to send data through already existing sockets
Operating System - Linux
1833024
Members
2356
Online
110049
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2011 11:10 AM
03-01-2011 11:10 AM
How to send data through already existing sockets
Hi,
Is there a way to send data through sockets already created by another VUser, so as to minimize the number of connections made to the target server?
Thanks,
Satish
Is there a way to send data through sockets already created by another VUser, so as to minimize the number of connections made to the target server?
Thanks,
Satish
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2011 04:07 AM
03-02-2011 04:07 AM
Re: How to send data through already existing sockets
What is a VUser? Are you talking about some specific application?
Generally you cannot just hijack the sockets off another process, since a) the OS will not allow that, and b) you don't know what the other process was doing with it.
If the original owner was in the middle of sending some request while you somehow managed to grab the socket to send your own request, the target server would see the two requests jumbled together into an unrecognizable mess. A typical result would be the server sending some sort of a "protocol error detected" response and/or closing the connection at the server end.
So, if two or more processes need to use the same socket, some sort of coordination scheme is required. The processes will either need to communicate with each other using some Inter-Process Communication method that allows passing file descriptors/sockets from one process to another, or one of the processes needs to be acting as a proxy for the others. This would be rather specific to whatever protocol your target server is using and what your processes are designed to do, so it's likely you would have to design and program it yourself.
Also, the network protocol used by the target server is important. If the protocol is designed to accept only one request per connection, you cannot benefit much from sharing the sockets, as each socket must be closed anyway after the first request is made through it.
MK
Generally you cannot just hijack the sockets off another process, since a) the OS will not allow that, and b) you don't know what the other process was doing with it.
If the original owner was in the middle of sending some request while you somehow managed to grab the socket to send your own request, the target server would see the two requests jumbled together into an unrecognizable mess. A typical result would be the server sending some sort of a "protocol error detected" response and/or closing the connection at the server end.
So, if two or more processes need to use the same socket, some sort of coordination scheme is required. The processes will either need to communicate with each other using some Inter-Process Communication method that allows passing file descriptors/sockets from one process to another, or one of the processes needs to be acting as a proxy for the others. This would be rather specific to whatever protocol your target server is using and what your processes are designed to do, so it's likely you would have to design and program it yourself.
Also, the network protocol used by the target server is important. If the protocol is designed to accept only one request per connection, you cannot benefit much from sharing the sockets, as each socket must be closed anyway after the first request is made through it.
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2011 11:04 AM
03-11-2011 11:04 AM
Re: How to send data through already existing sockets
If you want to minimize the connections between a server, how about using a SSH tunnel?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP