Skip to content

Commit 4200377

Browse files
authored
Merge pull request #10 from nwn2dev/feature/name-change-next
Updated names to reflect "next" iterator, not "pull" like from a stack
2 parents 9287824 + 7812c7e commit 4200377

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

include/nwnx_rpc.nss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const string RPC_PLUGIN_SEPARATOR = "!";
66
const string RPC_RESET_GENERIC = "RPC_RESET_GENERIC_";
77
const string RPC_BUILD_GENERIC = "RPC_BUILD_GENERIC_";
88
const string RPC_BUILD_GENERIC_STREAM = "RPC_BUILD_GENERIC_STREAM_";
9-
const string RPC_PULL_GENERIC_STREAM = "RPC_PULL_GENERIC_STREAM_";
9+
const string RPC_NEXT_GENERIC_STREAM = "RPC_NEXT_GENERIC_STREAM_";
1010

1111
const string RPC_GET_INT = "RPC_GET_INT_";
1212
const string RPC_SET_INT = "RPC_SET_INT_";
@@ -27,7 +27,7 @@ const int RPC_END_BUILD_GENERIC = 2;
2727
void RPCResetBuildGenericEx();
2828
void RPCBuildGenericEx(string sClient, string sAction);
2929
void RPCBuildGenericStreamEx(string sClient, string sAction);
30-
int RPCPullGenericStreamEx();
30+
int RPCNextGenericStreamEx();
3131
int RPCGetIntEx(string sParam1, int nParam2 = RPC_PARAM_2_DEFAULT);
3232
void RPCSetIntEx(string sParam1, int nValue, int nParam2 = RPC_PARAM_2_DEFAULT);
3333
int RPCGetBoolEx(string sParam1, int nParam2 = RPC_PARAM_2_DEFAULT);
@@ -51,8 +51,8 @@ void RPCBuildGenericStreamEx(string sClient, string sAction) {
5151
NWNXSetString(RPC_PLUGIN_ID, RPC_BUILD_GENERIC_STREAM, sClient, RPC_PARAM_2_DEFAULT, sAction);
5252
}
5353

54-
int RPCPullGenericStreamEx() {
55-
return NWNXGetInt(RPC_PLUGIN_ID, RPC_PULL_GENERIC_STREAM, "", RPC_PARAM_2_DEFAULT);
54+
int RPCNextGenericStreamEx() {
55+
return NWNXGetInt(RPC_PLUGIN_ID, RPC_NEXT_GENERIC_STREAM, "", RPC_PARAM_2_DEFAULT);
5656
}
5757

5858
int RPCGetIntEx(string sParam1, int nParam2 = RPC_PARAM_2_DEFAULT) {

plugin/rpc_plugin.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const rpcResetGeneric string = "RPC_RESET_GENERIC_"
2525
const rpcBuildGeneric string = "RPC_BUILD_GENERIC_"
2626
const rpcBuildGenericStream string = "RPC_BUILD_GENERIC_STREAM_"
27-
const rpcPullGenericStream string = "RPC_PULL_GENERIC_STREAM_"
27+
const rpcNextGenericStream string = "RPC_NEXT_GENERIC_STREAM_"
2828

2929
const rpcGetInt string = "RPC_GET_INT_"
3030
const rpcSetInt string = "RPC_SET_INT_"
@@ -104,7 +104,7 @@ func (p *rpcPlugin) buildExBuildGenericStream(client *rpcClient, request *pb.ExB
104104
return nil
105105
}
106106

107-
func (p *rpcPlugin) pullExGenericStreamClient() (*pb.ExBuildGenericResponse, error) {
107+
func (p *rpcPlugin) nextExGenericStreamClient() (*pb.ExBuildGenericResponse, error) {
108108
if p.globalExGenericStreamClient == nil {
109109
return nil, errors.New("stream client not available")
110110
}
@@ -298,9 +298,9 @@ func (p *rpcPlugin) getInt(sFunction, sParam1 string, nParam2 int32) int32 {
298298
}
299299

300300
return value
301-
case rpcPullGenericStream:
301+
case rpcNextGenericStream:
302302
p.resetBuildGeneric()
303-
response, err := p.pullExGenericStreamClient()
303+
response, err := p.nextExGenericStreamClient()
304304
p.globalExGenericResponse = response
305305

306306
if response == nil || err != nil {

0 commit comments

Comments
 (0)