recieve -> receive

This commit is contained in:
Anuken
2020-07-14 11:16:32 -04:00
parent da577a0db2
commit f9b6b8e5b7
17 changed files with 47 additions and 47 deletions

View File

@@ -85,7 +85,7 @@ public class ArcNetProvider implements NetProvider{
Connect c = new Connect();
c.addressTCP = ip;
Log.debug("&bRecieved connection: @", c.addressTCP);
Log.debug("&bReceived connection: @", c.addressTCP);
connections.add(kn);
Core.app.post(() -> net.handleServerReceived(kn, c));

View File

@@ -85,7 +85,7 @@ public class Net{
}
/**
* Sets the client loaded status, or whether it will recieve normal packets from the server.
* Sets the client loaded status, or whether it will receive normal packets from the server.
*/
public void setClientLoaded(boolean loaded){
clientLoaded = loaded;
@@ -205,21 +205,21 @@ public class Net{
}
/**
* Registers a client listener for when an object is recieved.
* Registers a client listener for when an object is received.
*/
public <T> void handleClient(Class<T> type, Cons<T> listener){
clientListeners.put(type, listener);
}
/**
* Registers a server listener for when an object is recieved.
* Registers a server listener for when an object is received.
*/
public <T> void handleServer(Class<T> type, Cons2<NetConnection, T> listener){
serverListeners.put(type, (Cons2<NetConnection, Object>)listener);
}
/**
* Call to handle a packet being recieved for the client.
* Call to handle a packet being received for the client.
*/
public void handleClientReceived(Object object){
@@ -231,7 +231,7 @@ public class Net{
StreamChunk c = (StreamChunk)object;
StreamBuilder builder = streams.get(c.id);
if(builder == null){
throw new RuntimeException("Recieved stream chunk without a StreamBegin beforehand!");
throw new RuntimeException("Received stream chunk without a StreamBegin beforehand!");
}
builder.add(c.data);
if(builder.isDone()){
@@ -256,7 +256,7 @@ public class Net{
}
/**
* Call to handle a packet being recieved for the server.
* Call to handle a packet being received for the server.
*/
public void handleServerReceived(NetConnection connection, Object object){

View File

@@ -22,10 +22,10 @@ public abstract class NetConnection{
public @Nullable Unitc lastUnit;
public Vec2 lastPosition = new Vec2();
/** ID of last recieved client snapshot. */
public int lastRecievedClientSnapshot = -1;
/** Timestamp of last recieved snapshot. */
public long lastRecievedClientTime;
/** ID of last received client snapshot. */
public int lastReceivedClientSnapshot = -1;
/** Timestamp of last received snapshot. */
public long lastReceivedClientTime;
/** Build requests that have been recently rejected. This is cleared every snapshot. */
public Seq<BuildPlan> rejectedRequests = new Seq<>();