all hardcore ips and ports moved to Main.kt
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import exceptions.RcControlException
|
|
||||||
import net.server.handlers.AbstractHandler
|
import net.server.handlers.AbstractHandler
|
||||||
import net.server.handlers.flash.LoadBin
|
import net.server.handlers.flash.LoadBin
|
||||||
import net.server.handlers.main.GetLocation
|
import net.server.handlers.main.GetLocation
|
||||||
@@ -17,6 +16,9 @@ val deltaTimeLocationRefresh: Int = 100//ms
|
|||||||
val serverPort: Int = 8888
|
val serverPort: Int = 8888
|
||||||
val serverIp: String = "127.0.0.1"
|
val serverIp: String = "127.0.0.1"
|
||||||
|
|
||||||
|
val mainServerAddress = "127.0.0.1"
|
||||||
|
val mainServerPort = 7925
|
||||||
|
|
||||||
val protoBuf = require("protobufjs")
|
val protoBuf = require("protobufjs")
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package net
|
package net
|
||||||
|
|
||||||
import require
|
import require
|
||||||
|
import mainServerAddress
|
||||||
|
import mainServerPort
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by user on 7/28/16.
|
* Created by user on 7/28/16.
|
||||||
@@ -9,8 +11,8 @@ val http = require("http")
|
|||||||
|
|
||||||
fun sendRequest(dataBuffer: dynamic, url: String, successCallback: (responseData: ByteArray) -> Unit, errorCallback: (err: dynamic) -> Unit) {
|
fun sendRequest(dataBuffer: dynamic, url: String, successCallback: (responseData: ByteArray) -> Unit, errorCallback: (err: dynamic) -> Unit) {
|
||||||
val options: dynamic = {}
|
val options: dynamic = {}
|
||||||
val serverAddress = "127.0.0.1"
|
val serverAddress = mainServerAddress
|
||||||
val port = 7925
|
val port = mainServerPort
|
||||||
js("options = {hostname:serverAddress, port:port, path:url, method:'POST'}")
|
js("options = {hostname:serverAddress, port:port, path:url, method:'POST'}")
|
||||||
|
|
||||||
val request = http.request(options, { response ->
|
val request = http.request(options, { response ->
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import net.server.handlers.AbstractHandler
|
|||||||
* Created by user on 7/27/16.
|
* Created by user on 7/27/16.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fun start(handlers: MutableMap<String, AbstractHandler>, port:Int) {
|
fun start(handlers: MutableMap<String, AbstractHandler>, port: Int) {
|
||||||
val http = require("http")
|
val http = require("http")
|
||||||
val url = require("url")
|
val url = require("url")
|
||||||
http.createServer({ request, response ->
|
http.createServer({ request, response ->
|
||||||
|
|||||||
Reference in New Issue
Block a user