double start,
const char *addr,
uint32_t totalBytes,
- void * action)
+ simgrid::surf::NetworkNS3Action * action)
{
if(!dict_socket)
dict_socket = xbt_dict_new_homogeneous(delete_mysocket);
MySocket *mysocket = new MySocket();
mysocket->totalBytes = totalBytes;
mysocket->remaining = totalBytes;
- mysocket->bufferedBytes = 0;
- mysocket->sentBytes = 0;
- mysocket->finished = 0;
mysocket->action = action;
transformSocketPtr(sock);
static void receive_callback(Ptr<Socket> localSocket){
MySocket* mysocket = get_my_socket(localSocket);
- if (mysocket->finished == 0){
- mysocket->finished = 1;
+ if (mysocket->finished == false){
+ mysocket->finished = true;
XBT_DEBUG("recv_cb of F[%p, %p, %d]", mysocket, mysocket->action, mysocket->totalBytes);
XBT_DEBUG("Stop simulator at %f seconds", Simulator::Now().GetSeconds());
Simulator::Stop(Seconds(0.0));