Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Runtime/Scripts/OscClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class OscClient
/// <summary>Where this client is sending messages to</summary>
public IPEndPoint Destination { get; }

public OscClient(string ipAddress, int port)
public OscClient(string ipAddress, int port, int bufferCapacity = 4096)
{
m_Writer = new OscWriter();
m_Writer = new OscWriter(bufferCapacity);

m_Socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
if (ipAddress == "255.255.255.255")
Expand Down
4 changes: 2 additions & 2 deletions Runtime/Scripts/OscServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ public void Start()
/// </summary>
/// <param name="port">The port to listen for incoming message on</param>
/// <returns></returns>
public static OscServer GetOrCreate(int port)
public static OscServer GetOrCreate(int port, int bufferSize = 4096)
{
OscServer server;
if (!PortToServer.TryGetValue(port, out server))
{
server = new OscServer(port);
server = new OscServer(port, bufferSize);
PortToServer[port] = server;
}
return server;
Expand Down