Skip to content

Commit

Permalink
#28 fixed (Not Tested;;)
Browse files Browse the repository at this point in the history
  • Loading branch information
박찬영/게임기술팀/NK committed Dec 26, 2017
1 parent d2b799e commit 8f93985
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Assets/Plugins/socket.io/SocketInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ public class SocketInitializer : MonoBehaviour {
/// </summary>
public string WebSocketUrl {
get {
var builder = new StringBuilder(BaseUrl.Replace("http://", "ws://"));
var builder = new StringBuilder();

if (BaseUrl.StartsWith("http://"))
builder.Append(BaseUrl.Replace("http://", "ws://"));
else if (BaseUrl.StartsWith("https://"))
builder.Append(BaseUrl.Replace("https://", "wss://"));
else
Debug.Assert(false);

builder.Append("/socket.io/");

for (int i = 0; i < _urlQueries.Count; ++i) {
Expand Down

0 comments on commit 8f93985

Please sign in to comment.