xcode demo project update
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Example_OSX_App/ViewController.swift"
|
||||
@@ -74,11 +74,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Example_OSX_App/ViewController.swift"
|
||||
timestampString = "489624182.476645"
|
||||
timestampString = "490569101.315649"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "182"
|
||||
endingLineNumber = "182"
|
||||
startingLineNumber = "181"
|
||||
endingLineNumber = "181"
|
||||
landmarkName = "UI_ReadData(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -99,5 +99,21 @@
|
||||
landmarkType = "7">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Example_OSX_App/ViewController.swift"
|
||||
timestampString = "490569259.570714"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "180"
|
||||
endingLineNumber = "180"
|
||||
landmarkName = "UI_ReadData(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
@@ -23,8 +23,8 @@ class ViewController: NSViewController {
|
||||
@IBOutlet weak var txtTX: NSTextField!
|
||||
@IBOutlet weak var txtRX: NSTextField!
|
||||
|
||||
var serverPort:Int32 = 8081
|
||||
var serverAddr:String = "10.9.9.203"
|
||||
var serverPort:Int32 = 8080
|
||||
var serverAddr:String = "0.0.0.0"
|
||||
|
||||
var sock:Int32 = -1
|
||||
var accepted_sock:Int32 = -1
|
||||
@@ -166,7 +166,6 @@ class ViewController: NSViewController {
|
||||
@IBOutlet weak var btnReadData: NSButton!
|
||||
@IBAction func UI_ReadData(sender: AnyObject) {
|
||||
// Use ordinary read/write calls on ZeroTier socket
|
||||
|
||||
// TCP
|
||||
if(selectedProtocol == SOCK_STREAM)
|
||||
{
|
||||
@@ -175,9 +174,7 @@ class ViewController: NSViewController {
|
||||
//let str = "Welcome to the machine"
|
||||
print("strlen = %d\n", str.characters.count)
|
||||
let encodedDataArray = [UInt8](str.utf8)
|
||||
|
||||
// read(accepted_sock, UnsafeMutablePointer<Void>([txtTX.stringValue]), 128);
|
||||
read(accepted_sock, &buffer, 100);
|
||||
read(accepted_sock, &buffer, 4);
|
||||
print(buffer)
|
||||
|
||||
}
|
||||
@@ -226,7 +223,6 @@ class ViewController: NSViewController {
|
||||
|
||||
var service_thread : NSThread!
|
||||
func ztnc_start_service() {
|
||||
|
||||
// If you plan on using SOCKS Proxy, you don't need to initialize the RPC
|
||||
//start_service("/Users/Joseph/utest3")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user