git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@650826
13f79535-47bb-0310-9956-
ffa450edef68
boolean valid = false;
if ( (level & Channel.MBR_RX_SEQ)==Channel.MBR_RX_SEQ ) {
if ( receiver != null ) throw new IllegalStateException("McastService.receive already running.");
- if ( sender == null ) socket.joinGroup(address);
+ try {
+ if ( sender == null ) socket.joinGroup(address);
+ }catch (IOException iox) {
+ log.error("Unable to join multicast group, make sure your system has multicasting enabled.");
+ throw iox;
+ }
doRunReceiver = true;
receiver = new ReceiverThread();
receiver.setDaemon(true);
if ( writebuf != null ) writebuf.clear();
else writebuf = getBuffer(length);
if ( writebuf.capacity() < length ) writebuf = getBuffer(length);
+
+ //TODO use ByteBuffer.wrap to avoid copying the data.
writebuf.put(data,offset,length);
//writebuf.rewind();
//set the limit so that we don't write non wanted data