ok thanks but new error : error = in dedi host screen when trying to load insim : = " insim: first byte in packet does not match size "
PLEASE HELP!!!!!
java.nio.channels.ClosedChannelException
at sun.nio.ch.DatagramChannelImpl.ensureOpen(DatagramChannelImpl.java:107)
at sun.nio.ch.DatagramChannelImpl.read(DatagramChannelImpl.java:313)
at org.kerf.jinsim.UDPChannel.receive(UDPChannel.java:120)
at org.kerf.jinsim.AbstractChannel.run(AbstractChannel.java:57)
at java.lang.Thread.run(Thread.java:619)
insimApplication.java:6: unreported exception java.io.IOException; must be caught or declared to be thrown
Client insimConnection1 = new Client("localhost", 6699, "adminpass");
super(PacketType.CAMERA_POSITION, 8);
super(PacketType.SET_CAR_CAMERA, 8);
try {
client.notifyListeners(packetData);
}
catch (Exception e) {
log.error("Something went wrong!", e);
}
public void construct(ByteBuffer buffer) throws BufferUnderflowException {
super.construct(buffer);
buffer.position(buffer.position()+1);
connectionId = buffer.get();
playerId = buffer.get();
typedByUser = buffer.get();
textStart = buffer.get();
message = getString(buffer, 128);
// Starblue 04/01/2008
// Rewind the buffer and check how long the "pre-message" part really is:
int pos = buffer.position();
buffer.position(pos-128);
String preMessage = getString(buffer,textStart);
textStart = (byte)(preMessage.length()+1);
buffer.position(pos);
}
String typedMessage = response.getMessage().substring(response.getTextStart());
15:13:58,890 ERROR - Something went wrong!
java.io.IOException: Connessione interrotta dal software del computer host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at net.sf.jinsim.TCPChannel.receive(TCPChannel.java:36)
at net.sf.jinsim.AbstractChannel.run(AbstractChannel.java:60)
try {
numberRead = receive(sizeBuffer);
} catch (ClosedChannelException ex) {
// do nothing chase numberRead is already -1
}
while (running) {
try {
[...]
} catch (Exception e) {
log.error("Something went wrong!", e);
}
}