Changeset 771

Show
Ignore:
Timestamp:
08/27/08 20:45:23 (10 months ago)
Author:
francis
Message:

Patch by tmm1: fixes bug in the Java implementation:
send_data would not send complete buffers.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r769 r771  
    12512514Aug08: Added a patch by Mike Murphy to support basic auth in the http 
    126126client. 
    127  
     12728Aug08: Added a patch by tmm1 to fix a longstanding problem with Java 
     128data-sends. 
  • trunk/java/src/com/rubyeventmachine/EmReactor.java

    r717 r771  
    310310                (Connections.get(sig)).scheduleOutboundData( bb ); 
    311311        } 
    312         public void sendData (String sig, String data, int length) throws IOException { 
    313                 sendData (sig, ByteBuffer.wrap(data.getBytes())); 
     312        public void sendData (String sig, byte[] data) throws IOException { 
     313                sendData (sig, ByteBuffer.wrap(data)); 
    314314                //(Connections.get(sig)).scheduleOutboundData( ByteBuffer.wrap(data.getBytes())); 
    315315        } 
  • trunk/lib/jeventmachine.rb

    r722 r771  
    7676        end 
    7777        def self.send_data sig, data, length 
    78                 @em.sendData sig, data, length 
     78                @em.sendData sig, data.to_java_bytes 
    7979        end 
    8080        def self.send_datagram sig, data, length, address, port