From 9f64dd01d87c40a9bc13fe8ce47e7b77f185488b Mon Sep 17 00:00:00 2001 From: bergamaschi Date: Fri, 2 Jul 2010 14:16:47 +0000 Subject: [PATCH] shorter timeout to socket connect git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@21 951219d9-93cf-4727-9268-0efd64621fa3 --- slsDetectorSoftware/MySocketTCP/MySocketTCP.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/slsDetectorSoftware/MySocketTCP/MySocketTCP.cxx b/slsDetectorSoftware/MySocketTCP/MySocketTCP.cxx index 88d2df313..0eaba476d 100644 --- a/slsDetectorSoftware/MySocketTCP/MySocketTCP.cxx +++ b/slsDetectorSoftware/MySocketTCP/MySocketTCP.cxx @@ -19,7 +19,7 @@ MySocketTCP::~MySocketTCP(){ } -MySocketTCP::MySocketTCP(unsigned short int const port_number): last_keep_connection_open_action_was_a_send(0), file_des(-1), send_rec_max_size(SEND_REC_MAX_SIZE), is_a_server(1), portno(DEFAULT_PORTNO), socketDescriptor(-1) +MySocketTCP::MySocketTCP(unsigned short int const port_number):portno(DEFAULT_PORTNO), is_a_server(1), socketDescriptor(-1), file_des(-1), send_rec_max_size(SEND_REC_MAX_SIZE), last_keep_connection_open_action_was_a_send(0) { // receiver (server) local no need for ip portno=port_number; @@ -48,8 +48,7 @@ MySocketTCP::MySocketTCP(unsigned short int const port_number): last_keep_connec -MySocketTCP::MySocketTCP(const char* const host_ip_or_name, unsigned short int const port_number): - last_keep_connection_open_action_was_a_send(0), file_des(-1), send_rec_max_size(SEND_REC_MAX_SIZE), is_a_server(0), portno(DEFAULT_PORTNO), socketDescriptor(-1) +MySocketTCP::MySocketTCP(const char* const host_ip_or_name, unsigned short int const port_number):portno(DEFAULT_PORTNO), is_a_server(0), socketDescriptor(-1),file_des(-1), send_rec_max_size(SEND_REC_MAX_SIZE), last_keep_connection_open_action_was_a_send(0) { // sender (client): where to? ip // SetupParameters(); strcpy(hostname,host_ip_or_name); @@ -160,7 +159,17 @@ int MySocketTCP::Connect(){ cerr << "Can not create socket "<