| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package main | 5 package main |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "log" | 9 "log" |
| 10 "net" | 10 "net" |
| 11 "net/http" | 11 "net/http" |
| 12 "time" | 12 "time" |
| 13 | 13 |
| 14 "mojo/public/go/application" | 14 "mojo/public/go/application" |
| 15 "mojo/public/go/bindings" | 15 "mojo/public/go/bindings" |
| 16 "mojo/public/go/system" | 16 "mojo/public/go/system" |
| 17 | 17 |
| 18 » "mojo/services/network/public/interfaces/net_address" | 18 » "mojo/services/network/interfaces/net_address" |
| 19 » "mojo/services/network/public/interfaces/network_service" | 19 » "mojo/services/network/interfaces/network_service" |
| 20 » "mojo/services/network/public/interfaces/tcp_bound_socket" | 20 » "mojo/services/network/interfaces/tcp_bound_socket" |
| 21 » "mojo/services/network/public/interfaces/tcp_connected_socket" | 21 » "mojo/services/network/interfaces/tcp_connected_socket" |
| 22 » "mojo/services/network/public/interfaces/tcp_server_socket" | 22 » "mojo/services/network/interfaces/tcp_server_socket" |
| 23 ) | 23 ) |
| 24 | 24 |
| 25 //#include "mojo/public/c/system/types.h" | 25 //#include "mojo/public/c/system/types.h" |
| 26 import "C" | 26 import "C" |
| 27 | 27 |
| 28 type MojoConnection struct { | 28 type MojoConnection struct { |
| 29 sendStream system.ProducerHandle | 29 sendStream system.ProducerHandle |
| 30 receiveStream system.ConsumerHandle | 30 receiveStream system.ConsumerHandle |
| 31 socket system.MessagePipeHandle | 31 socket system.MessagePipeHandle |
| 32 localAddr net.Addr | 32 localAddr net.Addr |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 | 239 |
| 240 //export MojoMain | 240 //export MojoMain |
| 241 func MojoMain(handle C.MojoHandle) C.MojoResult { | 241 func MojoMain(handle C.MojoHandle) C.MojoResult { |
| 242 application.Run(&HttpServerDelegate{}, system.MojoHandle(handle)) | 242 application.Run(&HttpServerDelegate{}, system.MojoHandle(handle)) |
| 243 return C.MOJO_RESULT_OK | 243 return C.MOJO_RESULT_OK |
| 244 } | 244 } |
| 245 | 245 |
| 246 func main() { | 246 func main() { |
| 247 } | 247 } |
| OLD | NEW |