Exemple #1
0
IoSocket *IoSocket_newWithSocket_(void *state, Socket *socket)
{
	IoSocket *self = IoSocket_new(state);
	Socket_free(SOCKET(self));
	IoObject_setDataPointer_(self, socket);
	return self;
}
Exemple #2
0
void initSocketAddons(IoState* state)
{
  IoState_addTagWithInitFunc_(state, IoSocket_initTagWithId_);
  IoObject_setSlot_to_(state->lobby, IoState_stringWithCString_(state, "Socket"), IoSocket_new(state));
}
Exemple #3
0
IoValue *IoSocket_clone(IoSocket *self, IoValue *locals, IoMessage *m)
{ 
  IoSocket *newSocket = IoSocket_new(self->tag->state);
  newSocket->host = strdup(self->host);
  return (IoValue *)newSocket; 
}