1.äºè§£go-microä¸çtransport
2.VB 修改 IP地地址
3.Network Service Discovery - mDNS-SD
äºè§£go-microä¸çtransport
è¿ç¯æç« ä»ç»çtransportä¸æ¯æ们å¦ä¹ çéç¹ï¼å ä¸ºä½ å¯è½ç¨ä¸å°ä»ï¼ä½æ¯ä½ä¸ºå¦ä¹ go-microçä¸é¨åï¼è¿æ¯å¾æä¸ä¸ãtransportç¨äºæå¡é´éä¿¡ï¼åºäºsocketçsend/recvè¯ä¹ãå ¶æ¥å£çæ¹æ³éå¦ä¸ï¼
typeTransportinterface{ Init(...Option)errorOptions()OptionsDial(addrstring,源码仿锐尔文档源码opts...DialOption)(Client,error)Listen(addrstring,opts...ListenOption)(Listener,error)String()string}var(DefaultTransportTransport=NewHTTPTransport()DefaultDialTimeout=time.Second*5)主è¦çä½ç¨ä½ç°å¨DialåListenæ¹æ³ä¸ï¼
func(h*/asim/go-micro/examples/v3/greeter/srv/proto/hello""github.com/asim/go-micro/v3""github.com/asim/go-micro/v3/util/log""google.golang.org/grpc")typeSaystruct{ }func(s*Say)Hello(ctxcontext.Context,req*hello.Request,rsp*hello.Response)error{ log.Log("ReceivedSay.Hellorequest")rsp.Msg="Hello"+req.Namereturnnil}funcmain(){ gofunc(){ for{ grpc.DialContext(context.TODO(),".0.0.1:")time.Sleep(time.Second)}}()service:=micro.NewService(micro.Name("go.micro.srv.greeter"),)//optionallysetupcommandlineusageservice.Init()//RegisterHandlershello.RegisterSayHandler(service.Server(),new(Say))//Runserveriferr:=service.Run();err!=nil{ log.Fatal(err)}}æå ³æå¡é´é信使ç¨çprotoç»æä½
syntax="proto3";packagego.micro.srv.greeter;serviceSay{ rpcHello(Request)returns(Response){ }}messageRequest{ stringname=1;}messageResponse{ stringmsg=1;}å¯å¨æå¡çæ¶åï¼éè¿æ¥å¿è¾åº,å¯ä»¥å¤§è´çäºè§£å¯å¨è¿ç¨
--::file=v3@v3.5.2-0.-cbbbc/service.go:level=infoStarting[service]go.micro.srv.greeter--::file=server/rpc_server.go:level=infoTransport[/android/server/NsdService.javaè¿éæ两个éè¦æ¹æ³ï¼
frameworks/base/services/core/java/com/android/server/NsdService.java
è¦æ§è¡ä¹ï¼é¦å éè¦æ§è¡ çåå§å
// åå§åè¿ç¨å ä¸åæäºï¼ç»è®ºæ¯ä½ä¸º client 端è¿æ¥ä¸ä¸ª socket å° server端ï¼netdï¼
ä¸åæåæç¸åï¼ä»¥ âmdnssdâ 为å½ä»¤ï¼ä»¥ âdiscoverâãdiscoveryIdãserviceType ä½ä¸ºåæ°å表
system/netd/server/main.cpp
system/core/libsysutils/src/SocketListener.cpp
onDataAvailable() æ¹æ³çå ·ä½å®ç°å¨ SocketListener åç±» FrameworkListener ä¸
system/core/libsysutils/include/sysutils/FrameworkListener.h
å ç¡®å® mCommand éåéæä»ä¹ï¼æè½ç¡®å®å ·ä½æ§è¡ç runCommand() æ¹æ³æ¯ä»ä¹
system/netd/server/MDnsSdListener.cpp
ä»ä»¥ä¸æºç å¯ç¥ï¼æ³¨åçå½ä»¤æ¯ âmdnssdâï¼ä¸åæç客æ·ç«¯å¹é
å ·ä½å½ä»¤çå¤çè¿ç¨å¦ä¸ï¼åææå°äº discover å start-service 两个æä½ï¼è¿éä» åæ discover å½ä»¤
external/mdnsresponder/mDNSShared/dnssd_clientstub.c
2024-11-25 01:351457人浏览
2024-11-25 01:272198人浏览
2024-11-25 00:532294人浏览
2024-11-25 00:121885人浏览
2024-11-25 00:00734人浏览
2024-11-24 23:581489人浏览
1.硬件工ç¨å¸å²ä½è责硬件工ç¨å¸å²ä½èè´£ 硬件工ç¨å¸å²ä½èè´£(ç¯) ãã
1.ThinkPHP5.1 源码分析四)- 门面Facade2.宝塔面板搭建小说CMS管理系统源码实测 - ThinkPHP6.0ThinkPHP5.1 源码分析四)- 门面Facade 门面为容
1.安卓apk反编译、修改、重新打包、签名全过程2.如何反编译apk文件得到源码和XML文件3.怎么反编译安卓apk安卓apk反编译、修改、重新打包、签名全过程 在处理安卓apk时,尽管代码混淆是