summaryrefslogtreecommitdiff
path: root/indra/llmessage/net.cpp
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-06-22 14:35:31 -0400
committerLogan Dethrow <log@lindenlab.com>2011-06-22 14:35:31 -0400
commitf91d40c25949ee8c5b1d5c1babab62d6dd90d0c8 (patch)
treef6edb92af2353a63bba05804cd89166487045559 /indra/llmessage/net.cpp
parentd5ea63119d1cc848318dbeeaa42e9ce3b777ee51 (diff)
Merge, fixed build issues by refactoring SOCKS 5 code.
Diffstat (limited to 'indra/llmessage/net.cpp')
-rw-r--r--indra/llmessage/net.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp
index 366a1835ca..e2d185b959 100644
--- a/indra/llmessage/net.cpp
+++ b/indra/llmessage/net.cpp
@@ -664,63 +664,4 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient,
#endif
-int tcp_handshake(LLSocket::ptr_t handle, char * dataout, apr_size_t outlen, char * datain, apr_size_t maxinlen)
-{
- apr_socket_t* apr_socket = handle->getSocket();
- apr_status_t rv;
-
- apr_size_t expected_len = outlen;
-
- apr_socket_opt_set(apr_socket, APR_SO_NONBLOCK, -5); // Blocking connection, 5 second timeout
- apr_socket_timeout_set(apr_socket, (APR_USEC_PER_SEC * 5));
-
- rv = apr_socket_send(apr_socket, dataout, &outlen);
- if (rv != APR_SUCCESS || expected_len != outlen)
- {
- llwarns << "Error sending data to proxy control channel" << llendl;
- ll_apr_warn_status(rv);
- return -1;
- }
-
- expected_len = maxinlen;
- do
- {
- rv = apr_socket_recv(apr_socket, datain, &maxinlen);
- llinfos << "Receiving packets." << llendl;
- llwarns << "Proxy control channel status: " << rv << llendl;
- } while (APR_STATUS_IS_EAGAIN(rv));
-
- if (rv != APR_SUCCESS)
- {
- llwarns << "Error receiving data from proxy control channel, status: " << rv << llendl;
- llwarns << "Received " << maxinlen << " bytes." << llendl;
- ll_apr_warn_status(rv);
- return rv;
- }
- else if (expected_len != maxinlen)
- {
- llwarns << "Incorrect data received length in proxy control channel" << llendl;
- return -1;
- }
-
- return 0;
-}
-
-LLSocket::ptr_t tcp_open_channel(LLHost host)
-{
- LLSocket::ptr_t socket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP);
- bool connected = socket->blockingConnect(host);
- if (!connected)
- {
- tcp_close_channel(socket);
- }
-
- return socket;
-}
-
-void tcp_close_channel(LLSocket::ptr_t handle)
-{
- handle.reset();
-}
-
//EOF