Révision | 6457fd76269425a86152e5392553a46e6e2b9e7f (tree) |
---|---|
l'heure | 2021-10-24 23:00:08 |
Auteur | Sebastian Bugiu <sebastian.bugiu@head...> |
Commiter | Sebastian Bugiu |
Added check to see if the number of bytes sent through the datagram is the same as the length of the buffer that was supposed to be sent.
@@ -0,0 +1,2 @@ | ||
1 | +# Default ignored files | |
2 | +.idea/workspace.xml |
@@ -1,20 +0,0 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | |
3 | - <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false"> | |
4 | - <output url="file://$MODULE_DIR$/target/classes" /> | |
5 | - <output-test url="file://$MODULE_DIR$/target/test-classes" /> | |
6 | - <content url="file://$MODULE_DIR$"> | |
7 | - <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |
8 | - <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> | |
9 | - <excludeFolder url="file://$MODULE_DIR$/target" /> | |
10 | - </content> | |
11 | - <orderEntry type="inheritedJdk" /> | |
12 | - <orderEntry type="sourceFolder" forTests="false" /> | |
13 | - <orderEntry type="library" name="Maven: com.esotericsoftware.kryo:kryo:2.24.0" level="project" /> | |
14 | - <orderEntry type="library" name="Maven: com.esotericsoftware.minlog:minlog:1.2" level="project" /> | |
15 | - <orderEntry type="library" name="Maven: org.objenesis:objenesis:2.1" level="project" /> | |
16 | - <orderEntry type="library" name="Maven: com.esotericsoftware:jsonbeans:0.7" level="project" /> | |
17 | - <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" /> | |
18 | - <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> | |
19 | - </component> | |
20 | -</module> | |
\ No newline at end of file |
@@ -10,6 +10,10 @@ | ||
10 | 10 | <groupId>com.esotericsoftware</groupId> |
11 | 11 | <artifactId>kryonet</artifactId> |
12 | 12 | <version>2.22.0-RC1</version> |
13 | + <properties> | |
14 | + <maven.compiler.source>8</maven.compiler.source> | |
15 | + <maven.compiler.target>8</maven.compiler.target> | |
16 | + </properties> | |
13 | 17 | <packaging>jar</packaging> |
14 | 18 | |
15 | 19 | <name>kryonet</name> |
@@ -135,7 +135,12 @@ | ||
135 | 135 | // Don't send the datagram. Just report that it's too big. |
136 | 136 | return -1; |
137 | 137 | } |
138 | - datagramChannel.send(writeBuffer, address); | |
138 | + int bytesSent = datagramChannel.send(writeBuffer, address); | |
139 | + if (DEBUG) { | |
140 | + if (bytesSent != length) { | |
141 | + debug("kryonet", "bytesSent: " + bytesSent + " length: " + length); | |
142 | + } | |
143 | + } | |
139 | 144 | |
140 | 145 | lastCommunicationTime = System.currentTimeMillis(); |
141 | 146 |