refactor: migrate lib/grpcentity to lib/grpc/basic and update path references
This commit is contained in:
+3
-3
@@ -2,7 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
entity "grpccanary/lib/grpcentity"
|
||||
"grpccanary/lib/grpc/basic"
|
||||
"grpccanary/lib/jsonexample"
|
||||
"time"
|
||||
)
|
||||
@@ -21,11 +21,11 @@ func grpcSample() {
|
||||
fmt.Println("--- starting gRPC IoT Simulation ---")
|
||||
|
||||
// 1. gRPC 서버를 백그라운드 고루틴으로 구동
|
||||
go entity.ServerRun(port)
|
||||
go basic.ServerRun(port)
|
||||
|
||||
// 2. 서버 포트가 바인딩되어 통신 대기 상태에 들어갈 시간을 일시적으로 보장
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
// 3. gRPC 클라이언트를 구동하여 원격 프로시저(RPC) 기동 시뮬레이션 집행
|
||||
entity.ClientRun(port)
|
||||
basic.ClientRun(port)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user