mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 14:38:14 +02:00
changing socket buffer size
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@645 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
d2839f1e5a
commit
d1a3cf8ed8
@ -221,6 +221,14 @@ enum communicationProtocol{
|
||||
socketDescriptor=-1;
|
||||
return;
|
||||
}
|
||||
|
||||
//increase buffer size if its udp
|
||||
if((communicationProtocol == UDP) && (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, &SOCKET_BUFFER_SIZE, sizeof(int)) == -1))
|
||||
{
|
||||
cerr << "Cannot set socket receive buffer size" << endl;
|
||||
}
|
||||
|
||||
|
||||
if (getProtocol()==SOCK_STREAM)
|
||||
listen(socketDescriptor, DEFAULT_BACKLOG);
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
#define MAXDET 100
|
||||
/** header length for data :gotthard*/
|
||||
#define HEADERLENGTH 12
|
||||
/** udp socket buffer size - 100MB*/
|
||||
#define SOCKET_BUFFER_SIZE (100*1024*1024)
|
||||
|
||||
/** maximum rois */
|
||||
#define MAX_ROIS 100
|
||||
|
Loading…
x
Reference in New Issue
Block a user