Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sopage committed Nov 23, 2017
1 parent 47f5189 commit c0dcc08
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
Socket连接客户端,精简版本的Netty或者Mina
### 使用方式

Gradle:
compile 'com.github.spacetimeme:dream-socket:1.1.1'
Gradle

compile 'com.github.spacetimeme:dream-socket:2.0.0'

Maven:
Maven

<dependency>
<groupId>com.github.spacetimeme</groupId>
<artifactId>dream-socket</artifactId>
<version>1.1.1</version>
<version>2.0.0</version>
</dependency>

[TCP Server](https://github.com/spacetimeme/DreamSocket/blob/master/src/test/java/com/dream/socket/TCPServer.java)
[TCP使用方式](https://github.com/spacetimeme/DreamSocket/blob/master/src/test/java/com/dream/socket/TCPClient.java)



[服务端](https://github.com/spacetimeme/IMService)

[TCP使用方式](https://github.com/spacetimeme/DreamSocket/blob/master/src/test/java/com/dream/socket/Client.java)

[UCP使用方式](https://github.com/spacetimeme/DreamSocket/blob/master/src/test/java/com/dream/socket/UDPClient.java)
[UDP Server](https://github.com/spacetimeme/DreamSocket/blob/master/src/test/java/com/dream/socket/UDPServer.java)
[UDP使用方式](https://github.com/spacetimeme/DreamSocket/blob/master/src/test/java/com/dream/socket/UDPClient.java)
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
apply plugin: 'java'
apply plugin: 'maven'
//apply from: 'gradle-mvn-push.gradle'
apply from: 'gradle-mvn-push.gradle'

repositories {
mavenCentral()
}

dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile "com.google.protobuf:protobuf-java:3.3.1"
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POM_VERSION_NAME=1.1.1
POM_VERSION_NAME=2.0.0
POM_GROUP=com.github.spacetimeme
POM_ARTIFACT_ID=dream-socket
POM_PACKAGING=jar
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/dream/socket/DreamUDPSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ public boolean isConnected() {
return false;
}

public boolean send(String host, int port, Message data) {
public boolean send(SocketAddress address, Message data) {
if (mSocketSendRunnable != null) {
SocketAddress address = new InetSocketAddress(host, port);
data.mAddress = address;
mSocketSendRunnable.send(data);
return true;
Expand Down

0 comments on commit c0dcc08

Please sign in to comment.