204 LmConnection *conn = rb_lm_connection_from_ruby_object (self); |
204 LmConnection *conn = rb_lm_connection_from_ruby_object (self); |
205 |
205 |
206 lm_connection_set_port (conn, NUM2UINT (port)); |
206 lm_connection_set_port (conn, NUM2UINT (port)); |
207 |
207 |
208 return Qnil; |
208 return Qnil; |
|
209 } |
|
210 |
|
211 VALUE |
|
212 conn_send (VALUE self, VALUE msg) |
|
213 { |
|
214 LmConnection *conn = rb_lm_connection_from_ruby_object (self); |
|
215 LmMessage *m = rb_lm_message_from_ruby_object (msg); |
|
216 |
|
217 return GBOOL2RVAL (lm_connection_send (conn, m, NULL)); |
209 } |
218 } |
210 |
219 |
211 VALUE |
220 VALUE |
212 conn_get_state (VALUE self) |
221 conn_get_state (VALUE self) |
213 { |
222 { |
245 rb_define_method (lm_cConnection, "proxy", conn_get_proxy, 0); |
254 rb_define_method (lm_cConnection, "proxy", conn_get_proxy, 0); |
246 rb_define_method (lm_cConnection, "proxy=", conn_set_proxy, 1); |
255 rb_define_method (lm_cConnection, "proxy=", conn_set_proxy, 1); |
247 */ |
256 */ |
248 |
257 |
249 /* Use one send message and check if there is a block passed? */ |
258 /* Use one send message and check if there is a block passed? */ |
|
259 |
|
260 rb_define_method (lm_cConnection, "send", conn_send, 1); |
250 /* |
261 /* |
251 rb_define_method (lm_cConnection, "send", conn_send, 1); |
|
252 rb_define_method (lm_cConnection, "send_with_reply", conn_send_with_reply, -1); |
262 rb_define_method (lm_cConnection, "send_with_reply", conn_send_with_reply, -1); |
253 rb_define_method (lm_cConnection, "send_raw", conn_send_raw, 1); |
263 rb_define_method (lm_cConnection, "send_raw", conn_send_raw, 1); |
254 */ |
264 */ |
255 |
265 |
256 rb_define_method (lm_cConnection, "state", conn_get_state, 0); |
266 rb_define_method (lm_cConnection, "state", conn_get_state, 0); |