Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Riham committed Aug 28, 2008
1 parent 42eab0d commit a8143e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions ext/rubymain.cpp
Expand Up @@ -627,13 +627,8 @@ extern "C" void Init_rubyeventmachine()
rb_define_module_function (EmModule, "connect_server", (VALUE(*)(...))t_connect_server, 2);
rb_define_module_function (EmModule, "connect_unix_server", (VALUE(*)(...))t_connect_unix_server, 1);

/*************************************************************************************
Added by Riham Aldakkak to expose an interface to register a socket with the
EventMacine event loop in a notify only mode
*************************************************************************************/
rb_define_module_function (EmModule, "attach_file", (VALUE (*)(...))t_attach_file, 3);
rb_define_module_function (EmModule, "unattach_file", (VALUE (*)(...))t_unattach_file, 2);
/*************************************************************************************/

rb_define_module_function (EmModule, "open_udp_socket", (VALUE(*)(...))t_open_udp_socket, 2);
rb_define_module_function (EmModule, "read_keyboard", (VALUE(*)(...))t_read_keyboard, 0);
Expand Down Expand Up @@ -672,17 +667,12 @@ extern "C" void Init_rubyeventmachine()
rb_define_const (EmModule, "ConnectionCompleted", INT2NUM(104));
rb_define_const (EmModule, "LoopbreakSignalled", INT2NUM(105));

/*************************************************************************************
added by Riham Aldakkak to expose an interface to register a socket with the
EventMacine event loop in a notify only mode
*************************************************************************************/
rb_define_const (EmModule, "ConnectionNotifyReadable", INT2NUM(106));
rb_define_const (EmModule, "ConnectionNotifyWritable", INT2NUM(107));
rb_define_const (EmModule, "AttachInNotifyReadableMode", INT2NUM(108));
rb_define_const (EmModule, "AttachInReadMode", INT2NUM(109));
rb_define_const (EmModule, "AttachInNotifyWritableMode", INT2NUM(110));
rb_define_const (EmModule, "AttachInWriteMode", INT2NUM(111));
/*************************************************************************************/

}

4 changes: 2 additions & 2 deletions lib/eventmachine.rb
Expand Up @@ -724,7 +724,7 @@ def EventMachine::connect server, port, handler=nil, *args
# }
#
######################################################
def EventMachine::attach socket, handler=nil, *args
def EventMachine::attach io, handler=nil, *args

klass = if (handler and handler.is_a?(Class))
handler
Expand All @@ -747,7 +747,7 @@ def EventMachine::attach socket, handler=nil, *args
AttachInWriteMode
end

s = attach_file socket.fileno, readmode, writemode
s = attach_file io.fileno, readmode, writemode

c = klass.new s, *args
@conns[s] = c
Expand Down

0 comments on commit a8143e7

Please sign in to comment.