mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
SlsDetector client library and servers. First import.
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@1 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
31
slsDetectorSoftware/MySocketTCP/rec.cxx
Normal file
31
slsDetectorSoftware/MySocketTCP/rec.cxx
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
//version 1.0, base development ij 19/01/09
|
||||
|
||||
#include <iostream>
|
||||
#include "MySocketTCP.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(){
|
||||
|
||||
char data[50000];
|
||||
int length=50000;
|
||||
|
||||
unsigned short int portnum = 1952;
|
||||
MySocketTCP* sock = new MySocketTCP(portnum);
|
||||
|
||||
cout<<"\tReceived :"<<sock->ReceiveDataAndKeepConnection(data,23000)<<endl;
|
||||
cout<<"\tReceived :"<<sock->ReceiveData(data,32200)<<endl;
|
||||
cout<<"\tReceived :"<<sock->ReceiveData(data,33300)<<endl;
|
||||
|
||||
|
||||
|
||||
cout<<"\tReceived :"<<sock->ReceiveData(data,30000)<<endl;
|
||||
|
||||
|
||||
cout<<"\tReceived :"<<sock->ReceiveData(data,3222)<<endl;
|
||||
|
||||
delete sock;
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user