コード例 #1
0
ファイル: transport-socket.c プロジェクト: Achint08/syslog-ng
void
log_transport_dgram_socket_init_instance(LogTransportSocket *self, gint fd)
{
  log_transport_init_instance(&self->super, fd);
  self->super.read = log_transport_dgram_socket_read_method;
  self->super.write = log_transport_dgram_socket_write_method;
}
コード例 #2
0
ファイル: transport-file.c プロジェクト: Achint08/syslog-ng
void
log_transport_file_init_instance(LogTransportFile *self, gint fd)
{
  log_transport_init_instance(&self->super, fd);
  self->super.read = log_transport_file_read_method;
  self->super.write = log_transport_file_write_method;
  self->super.free_fn = log_transport_free_method;
}
コード例 #3
0
ファイル: afstreams.c プロジェクト: create-iv/syslog-ng
LogTransport *
log_transport_streams_new(gint fd)
{
  LogTransport *self = g_new0(LogTransport, 1);

  log_transport_init_instance(self, fd);
  self->cond = G_IO_IN;
  self->read = log_transport_streams_read;
  self->free_fn = log_transport_free_method;
  return self;
}
コード例 #4
0
LogTransport *
log_transport_device_new(gint fd, gint timeout)
{
  LogTransportDevice *self = g_new0(LogTransportDevice, 1);

  log_transport_init_instance(&self->super, fd);
  self->timeout = timeout;
  self->super.read = log_transport_device_read_method;
  self->super.write = NULL;
  self->super.free_fn = log_transport_free_method;
  return &self->super;
}
コード例 #5
0
LogTransport *
log_transport_tls_new(TLSSession *tls_session, gint fd)
{
  LogTransportTLS *self = g_new0(LogTransportTLS, 1);

  log_transport_init_instance(&self->super, fd);
  self->super.cond = G_IO_IN | G_IO_OUT;
  self->super.read = log_transport_tls_read_method;
  self->super.write = log_transport_tls_write_method;
  self->super.free_fn = log_transport_tls_free_method;
  self->tls_session = tls_session;

  SSL_set_fd(self->tls_session->ssl, fd);
  return &self->super;
}