Skip to content

Commit

Permalink
Merge pull request #4 from TiJOSteam/develop
Browse files Browse the repository at this point in the history
update to TiJOS Framework 3.0
  • Loading branch information
tijosnet authored May 28, 2018
2 parents 43ec1d2 + 201f303 commit 9abb7f5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
7 changes: 4 additions & 3 deletions src/MQTT/MQTTClientSample/src/MqttClientDemo.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

import tijos.framework.networkcenter.TiDNS;
import tijos.framework.networkcenter.TiWLAN;
import tijos.framework.networkcenter.dns.TiDNS;
import tijos.framework.platform.wlan.TiWiFi;

import tijos.framework.networkcenter.mqtt.MqttClientListener;

import java.io.IOException;
Expand Down Expand Up @@ -83,7 +84,7 @@ public static void main(String args[]) {

// 启动WLAN及DNS
try {
TiWLAN.getInstance().startup(10);
TiWiFi.getInstance().startup(10);
TiDNS.getInstance().startup();
} catch (IOException ie) {
ie.printStackTrace();
Expand Down
6 changes: 4 additions & 2 deletions src/network/NTP/NTPClientSample/src/NtpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

import tijos.framework.networkcenter.ntp.NTPUDPClient;
import tijos.framework.networkcenter.ntp.TimeInfo;
import tijos.framework.networkcenter.*;

import tijos.framework.networkcenter.dns.TiDNS;
import tijos.framework.platform.wlan.TiWiFi;

/**
* Network Time Protocol Client 例程
Expand All @@ -20,7 +22,7 @@ public static void main(String[] args) {

try {
//启动WLAN及DNS
TiWLAN.getInstance().startup(10);
TiWiFi.getInstance().startup(10);
TiDNS.getInstance().startup();

NTPUDPClient ntpcli = new NTPUDPClient();
Expand Down
6 changes: 3 additions & 3 deletions src/network/dns/DNSSample/src/DnsDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.net.InetAddress;
import java.net.UnknownHostException;

import tijos.framework.networkcenter.TiDNS;
import tijos.framework.networkcenter.TiWLAN;
import tijos.framework.networkcenter.dns.TiDNS;
import tijos.framework.platform.wlan.TiWiFi;

/**
*
Expand All @@ -19,7 +19,7 @@ public static void main(String[] args) {

try {
//启动WLAN及DNS
TiWLAN.getInstance().startup(10);
TiWiFi.getInstance().startup(10);
TiDNS.getInstance().startup();

//System properties
Expand Down
6 changes: 3 additions & 3 deletions src/network/tcp_client/TCPClientSample/src/TcpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import java.net.Socket;

import tijos.framework.networkcenter.TiDNS;
import tijos.framework.networkcenter.TiWLAN;
import tijos.framework.networkcenter.dns.TiDNS;
import tijos.framework.platform.wlan.TiWiFi;

/**
* TCP client 例程, 在运行时请设置正确的TCP Server IP地址
Expand All @@ -25,7 +25,7 @@ public static void main(String[] args) {
try
{
//启动WLAN及DNS
TiWLAN.getInstance().startup(10);
TiWiFi.getInstance().startup(10);
TiDNS.getInstance().startup();

//Connect to the server with TCP
Expand Down
8 changes: 4 additions & 4 deletions src/network/tcp_server/TCPServerSample/src/TcpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import java.net.ServerSocket;
import java.net.Socket;

import tijos.framework.networkcenter.TiDNS;
import tijos.framework.networkcenter.TiWLAN;
import tijos.framework.networkcenter.dns.TiDNS;
import tijos.framework.platform.wlan.TiWiFi;

/**
* TCP Server 例程
* @author TiJOS
Expand All @@ -24,7 +24,7 @@ public static void main(String[] args)
Socket socket = null;
try {
//启动WLAN及DNS
TiWLAN.getInstance().startup(10);
TiWiFi.getInstance().startup(10);
TiDNS.getInstance().startup();

System.out.println("local ip = " + InetAddress.getByName("localhost"));
Expand Down
6 changes: 3 additions & 3 deletions src/network/udp/UDPSample/src/UdpDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.net.DatagramSocket;
import java.net.InetAddress;

import tijos.framework.networkcenter.TiDNS;
import tijos.framework.networkcenter.TiWLAN;
import tijos.framework.networkcenter.dns.TiDNS;
import tijos.framework.platform.wlan.TiWiFi;


/**
Expand All @@ -26,7 +26,7 @@ public static void main(String[] args)
try
{
//启动WLAN及DNS
TiWLAN.getInstance().startup(10);
TiWiFi.getInstance().startup(10);
TiDNS.getInstance().startup();


Expand Down

0 comments on commit 9abb7f5

Please sign in to comment.