xbt_assert0(LOBYTE(wsaData.wVersion) == 2 &&
HIBYTE(wsaData.wVersion) == 0,
"Cannot find a usable WinSock DLL");
xbt_assert0(LOBYTE(wsaData.wVersion) == 2 &&
HIBYTE(wsaData.wVersion) == 0,
"Cannot find a usable WinSock DLL");
} /* The WinSock DLL is acceptable. Proceed. */
#elif HAVE_WINSOCK_H
{
WSADATA wsaData;
xbt_assert0(WSAStartup(0x0101, &wsaData) == 0,
"Cannot find a usable WinSock DLL");
} /* The WinSock DLL is acceptable. Proceed. */
#elif HAVE_WINSOCK_H
{
WSADATA wsaData;
xbt_assert0(WSAStartup(0x0101, &wsaData) == 0,
"Cannot find a usable WinSock DLL");
gras_if_RL()? "tcp" : "sg", port);
trp = gras_trp_plugin_get_by_name(gras_if_SG()? "sg" : "tcp");
gras_if_RL()? "tcp" : "sg", port);
trp = gras_trp_plugin_get_by_name(gras_if_SG()? "sg" : "tcp");
sock->incoming ? 'y' : 'n',
sock->outgoing ? 'y' : 'n', sock->accepting ? 'y' : 'n');
} CATCH(e) {
sock->incoming ? 'y' : 'n',
sock->outgoing ? 'y' : 'n', sock->accepting ? 'y' : 'n');
} CATCH(e) {
gras_if_RL()? "tcp" : "sg");
/* defaults settings */
gras_trp_socket_new(0, &sock);
gras_if_RL()? "tcp" : "sg");
/* defaults settings */
gras_trp_socket_new(0, &sock);
/* plugin-specific */
TRY {
(*trp->socket_client) (trp,host,port,sock);
/* plugin-specific */
TRY {
(*trp->socket_client) (trp,host,port,sock);
sock->incoming ? 'y' : 'n',
sock->outgoing ? 'y' : 'n', sock->accepting ? 'y' : 'n');
} CATCH(e) {
sock->incoming ? 'y' : 'n',
sock->outgoing ? 'y' : 'n', sock->accepting ? 'y' : 'n');
} CATCH(e) {
if (sock == _gras_lastly_selected_socket) {
xbt_assert0(!gras_opt_trp_nomoredata_on_close || !sock->moredata,
"Closing a socket having more data in buffer while the nomoredata_on_close option is activated");
if (sock->moredata)
if (sock == _gras_lastly_selected_socket) {
xbt_assert0(!gras_opt_trp_nomoredata_on_close || !sock->moredata,
"Closing a socket having more data in buffer while the nomoredata_on_close option is activated");
if (sock->moredata)
("Closing a socket having more data in buffer. Option nomoredata_on_close disabled, so continuing.");
_gras_lastly_selected_socket = NULL;
}
/* FIXME: Issue an event when the socket is closed */
("Closing a socket having more data in buffer. Option nomoredata_on_close disabled, so continuing.");
_gras_lastly_selected_socket = NULL;
}
/* FIXME: Issue an event when the socket is closed */
if (sock) {
/* FIXME: Cannot get the dynar mutex, because it can be already locked */
// _xbt_dynar_foreach(sockets,cursor,sock_iter) {
for (cursor = 0; cursor < xbt_dynar_length(sockets); cursor++) {
_xbt_dynar_cursor_get(sockets, cursor, &sock_iter);
if (sock == sock_iter) {
if (sock) {
/* FIXME: Cannot get the dynar mutex, because it can be already locked */
// _xbt_dynar_foreach(sockets,cursor,sock_iter) {
for (cursor = 0; cursor < xbt_dynar_length(sockets); cursor++) {
_xbt_dynar_cursor_get(sockets, cursor, &sock_iter);
if (sock == sock_iter) {
xbt_dynar_length(sockets));
xbt_dynar_cursor_rm(sockets, &cursor);
if (sock->plugin->socket_close)
xbt_dynar_length(sockets));
xbt_dynar_cursor_rm(sockets, &cursor);
if (sock->plugin->socket_close)
("Ignoring request to free an unknown socket (%p). Execution stack:",
sock);
xbt_backtrace_display_current();
}
("Ignoring request to free an unknown socket (%p). Execution stack:",
sock);
xbt_backtrace_display_current();
}
+ XBT_IN("");
+ THROW0(unknown_error,0,"measurement sockets were broken in this release of SimGrid and should be ported back in the future."
+ "If you depend on it, sorry, you have to use an older version, or wait for the future version using it...");
"Socket not suited for data send (was created with gras_socket_server(), not gras_socket_client())");
for (sent_sofar = 0; sent_sofar < msg_amount; sent_sofar++) {
"Socket not suited for data send (was created with gras_socket_server(), not gras_socket_client())");
for (sent_sofar = 0; sent_sofar < msg_amount; sent_sofar++) {
"Sent %lu msgs of %lu (size of each: %ld) to %s:%d",
sent_sofar, msg_amount, msg_size, gras_socket_peer_name(peer),
gras_socket_peer_port(peer));
(*peer->plugin->raw_send) (peer, chunk, msg_size);
}
"Sent %lu msgs of %lu (size of each: %ld) to %s:%d",
sent_sofar, msg_amount, msg_size, gras_socket_peer_name(peer),
gras_socket_peer_port(peer));
(*peer->plugin->raw_send) (peer, chunk, msg_size);
}
"Sent %lu msgs of %lu (size of each: %ld) to %s:%d", sent_sofar,
msg_amount, msg_size, gras_socket_peer_name(peer),
gras_socket_peer_port(peer));
"Sent %lu msgs of %lu (size of each: %ld) to %s:%d", sent_sofar,
msg_amount, msg_size, gras_socket_peer_name(peer),
gras_socket_peer_port(peer));
+ XBT_IN("");
+ THROW0(unknown_error,0,"measurement sockets were broken in this release of SimGrid and should be ported back in the future."
+ "If you depend on it, sorry, you have to use an older version, or wait for the future version using it...");
xbt_assert0(peer->incoming, "Socket not suited for data receive");
for (got_sofar = 0; got_sofar < msg_amount; got_sofar++) {
xbt_assert0(peer->incoming, "Socket not suited for data receive");
for (got_sofar = 0; got_sofar < msg_amount; got_sofar++) {
"Recvd %ld msgs of %lu (size of each: %ld) from %s:%d",
got_sofar, msg_amount, msg_size, gras_socket_peer_name(peer),
gras_socket_peer_port(peer));
(peer->plugin->raw_recv) (peer, chunk, msg_size);
}
"Recvd %ld msgs of %lu (size of each: %ld) from %s:%d",
got_sofar, msg_amount, msg_size, gras_socket_peer_name(peer),
gras_socket_peer_port(peer));
(peer->plugin->raw_recv) (peer, chunk, msg_size);
}
"Recvd %ld msgs of %lu (size of each: %ld) from %s:%d",
got_sofar, msg_amount, msg_size, gras_socket_peer_name(peer),
gras_socket_peer_port(peer));
if (gras_if_RL())
free(chunk);
"Recvd %ld msgs of %lu (size of each: %ld) from %s:%d",
got_sofar, msg_amount, msg_size, gras_socket_peer_name(peer),
gras_socket_peer_port(peer));
if (gras_if_RL())
free(chunk);
+ THROW0(unknown_error,0,"measurement sockets were broken in this release of SimGrid and should be ported back in the future."
+ "If you depend on it, sorry, you have to use an older version, or wait for the future version using it...");
s, gras_socket_peer_name(s), gras_socket_peer_port(s),
s->valid ? "(valid)" : "(peer dead)");
}
s, gras_socket_peer_name(s), gras_socket_peer_port(s),
s->valid ? "(valid)" : "(peer dead)");
}