MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / TcpConnection

Method TcpConnection

src/plugin/ipc/socket/socketconnection.cpp:228–252  ·  view source on GitHub ↗

onSocket*/

Source from the content-addressed store, hash-verified

226
227/*onSocket*/
228TcpConnection::TcpConnection(int domain, int type, int protocol)
229 : Connection(TCP_CREATED)
230 , SocketConnection(domain, type, protocol)
231{
232 if (domain != -1) {
233 // Sometimes _sockType contains SOCK_CLOEXEC/SOCK_NONBLOCK flags.
234 if ((type & 077) == SOCK_DGRAM) {
235 JWARNING(false) (type)
236 .Text("Datagram Sockets not supported. "
237 "Hopefully, this is a short lived connection!");
238 } else {
239// In the domain/type check (around lines 239–247):
240 int bt = baseType();
241 if (domain == AF_UNIX) {
242 JWARNING(bt == SOCK_STREAM || bt == SOCK_SEQPACKET)
243 (domain) (type) (protocol);
244 } else if (domain == AF_INET || domain == AF_INET6) {
245 JWARNING(bt == SOCK_STREAM)
246 (domain) (type) (protocol);
247 }
248 }
249 JTRACE("Creating TcpConnection.") (id()) (domain) (type) (protocol);
250 }
251 memset(&_bindAddr, 0, sizeof _bindAddr);
252}
253
254TcpConnection&
255TcpConnection::asTcp()

Callers

nothing calls this directly

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected