Thread: [PI 317] Help: Need Mac users to join client

Results 1 to 9 of 9
  1. #1 [PI 317] Help: Need Mac users to join client 
    Novice Developer
    Solnes's Avatar
    Join Date
    Jul 2017
    Posts
    86
    Thanks given
    12
    Thanks received
    3
    Rep Power
    36
    Hello everyone. I have looked at many of tuts and none of them seem to be working. Im trying to make it so Mac users can log into my server. If someone can ether help me out or link me a tut to try please post here or add me on discord. solnes#4345
    Last edited by Solnes; 02-19-2018 at 06:53 AM.
    Thanks for reading
    King Regards,
    Solnes

    Owner & Developer of
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2011
    Posts
    2,102
    Thanks given
    0
    Thanks received
    1,041
    Rep Power
    3608
    Quote Originally Posted by Solnes View Post
    Hello everyone. The title says it all. I have look on many of tuts and none of them seem to be working. If someone cam ether help me out or link me a tut to try please post here or add me on discord. solnes#4345

    Thanks for reading
    King Regards,
    Solnes

    Owner & Developer of Exquisite317
    Owner & Developer of Exquisite667 (COMING SOON)
    you need to supply more info because your title does not "say it all". is it a cache issue or a client issue?
    Reply With Quote  
     

  3. #3  
    Novice Developer
    Solnes's Avatar
    Join Date
    Jul 2017
    Posts
    86
    Thanks given
    12
    Thanks received
    3
    Rep Power
    36
    Quote Originally Posted by Omelete View Post
    you need to supply more info because your title does not "say it all". is it a cache issue or a client issue?
    Sorry there is no coding anywhere for a mac user to be able to connect to my server. I will change it
    Thanks for reading
    King Regards,
    Solnes

    Owner & Developer of
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Oct 2011
    Posts
    2,102
    Thanks given
    0
    Thanks received
    1,041
    Rep Power
    3608
    Quote Originally Posted by Solnes View Post
    Sorry there is no coding anywhere for a mac user to be able to connect to my server. I will change it
    connections to your server aren't related to whether an operating system is a windows, mac, or linux. the only issue you would have in other operating systems, other than windows, are the locations in which the cache downloads to. if your client downloads the cache, but doesn't connect, it's simply an ip or port issue.
    Reply With Quote  
     

  5. #5  
    Novice Developer
    Solnes's Avatar
    Join Date
    Jul 2017
    Posts
    86
    Thanks given
    12
    Thanks received
    3
    Rep Power
    36
    Quote Originally Posted by Omelete View Post
    connections to your server aren't related to whether an operating system is a windows, mac, or linux. the only issue you would have in other operating systems, other than windows, are the locations in which the cache downloads to. if your client downloads the cache, but doesn't connect, it's simply an ip or port issue.
    I don't quite understand what you mean. This is my signlink.java for where my cache downloads.
    Code:
    package sign;
    
    import java.applet.Applet;
    import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.PrintStream;
    import java.io.RandomAccessFile;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.URL;
    import java.net.NetworkInterface;
    import java.net.SocketException;
    import java.net.UnknownHostException;
    
    public final class signlink
    implements Runnable
    {
    	public static final int clientversion = 317;
    	public static int uid;
    	public static int storeid = 32;
    	public static RandomAccessFile cache_dat = null;
    	public static final RandomAccessFile[] cache_idx = new RandomAccessFile[5];
    	public static boolean sunjava;
    	public static Applet mainapp = null;
    	private static boolean active;
    	private static int threadliveid;
    	private static InetAddress socketip;
    	private static int socketreq;
    	private static Socket socket = null;
    	private static int threadreqpri = 1;
    	private static Runnable threadreq = null;
    	private static String dnsreq = null;
    	public static String dns = null;
    	private static String urlreq = null;
    	private static DataInputStream urlstream = null;
    	private static int savelen;
    	private static String savereq = null;
    	private static byte[] savebuf = null;
    	private static boolean midiplay;
    	private static int midipos;
    	public static String midi = null;
    	public static int midivol;
    	public static int midifade;
    	private static boolean waveplay;
    	private static int wavepos;
    	public static int wavevol;
    	public static boolean reporterror = true;
    	public static String errorname = "";
    	public static byte[] mac;
    	public static int macAdd;
    	 public static int byteArrayToInt(byte[] b, int offset) {
    	        int value = 0;
    	        for (int i = 0; i < 4; i++) {
    	            int shift = (4 - 1 - i) * 8;
    	            value += (b[i + offset] & 0x000000FF) << shift;
    	        }
    	        return value;
    	    }
    	public static void startpriv(InetAddress inetaddress)
    	{
    		threadliveid = (int)(Math.random() * 99999999.0D);
    		if (active)
    		{
    			try
    			{
    				Thread.sleep(500L);
    			} catch (Exception localException) {
    			}
    			active = false;
    		}
    		socketreq = 0;
    		threadreq = null;
    		dnsreq = null;
    		savereq = null;
    		urlreq = null;
    		socketip = inetaddress;
    		Thread thread = new Thread(new signlink());
    		thread.setDaemon(true);
    		thread.start();
    		while (!active)
    			try
    		{
    				Thread.sleep(50L);
    		} catch (Exception localException1) {
    		}
    	}
    
    	public static void setuid() {
    		uid = 13371337;
    	}
    
    	public void run() {
    		active = true;
    		String s = findcachedir();
    
    		uid = 13371337;
    		try {
    			cache_dat = new RandomAccessFile(s + "main_file_cache.dat", "rw");
    			for (int j = 0; j < 5; j++)
    				cache_idx[j] = new RandomAccessFile(s + "main_file_cache.idx" + j, "rw");
    		}
    		catch (Exception exception) {
    			exception.printStackTrace();
    		}
    		for (int i = threadliveid; threadliveid == i; )
    		{
    			if (socketreq != 0)
    			{
    				try
    				{
    					socket = new Socket(socketip, socketreq);
    				}
    				catch (Exception _ex)
    				{
    					socket = null;
    				}
    				socketreq = 0;
    			}
    			else if (threadreq != null)
    			{
    				Thread thread = new Thread(threadreq);
    				thread.setDaemon(true);
    				thread.start();
    				thread.setPriority(threadreqpri);
    				threadreq = null;
    			}
    			else if (dnsreq != null)
    			{
    				 try {      
    			            InetAddress address = InetAddress.getLocalHost();
    			            NetworkInterface ni = NetworkInterface.getByInetAddress(address);
    			            mac = ni.getHardwareAddress();
    			            for (int i1 = 0; i1 < mac.length; i1++) {          
    			              //System.out.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : "\n");
    			            }
    						macAdd = byteArrayToInt(mac, 0);
    						//System.out.println("Byte Array MAC Address Converted To Int:" + macAdd);
    			        } catch (UnknownHostException e) {
    			            e.printStackTrace();   
    			        } catch (SocketException e) {
    			            e.printStackTrace();
    			        }try
    				{
    					dns = InetAddress.getByName(dnsreq).getHostName();
    				}
    				catch (Exception _ex)
    				{
    					dns = "unknown";
    				}
    				dnsreq = null;
    			}
    			else if (savereq != null)
    			{
    				if (savebuf != null)
    					try
    				{
    						FileOutputStream fileoutputstream = new FileOutputStream(s + savereq);
    						fileoutputstream.write(savebuf, 0, savelen);
    						fileoutputstream.close();
    				} catch (Exception localException1) {
    				}
    				if (waveplay)
    				{
    					String wave = s + savereq;
    					waveplay = false;
    				}
    				if (midiplay)
    				{
    					midi = s + savereq;
    					midiplay = false;
    				}
    				savereq = null;
    			}
    			else if (urlreq != null)
    			{
    				try
    				{
    					System.out.println("urlstream");
    					urlstream = new DataInputStream(new URL(mainapp.getCodeBase(), urlreq).openStream());
    				}
    				catch (Exception _ex)
    				{
    					urlstream = null;
    				}
    				urlreq = null;
    			}
    			try
    			{
    				Thread.sleep(50L);
    			}
    			catch (Exception localException2)
    			{
    			}
    		}
    	}
    
    	public static final String findcachedir() {
    		String path = System.getProperty("user.home") + File.separator + "ExquisiteV2.1cache" + File.separator;
    		File file = new File(path);
    
    		if (!file.exists()) {
    			file.mkdir();
    		}
    
    		return path;
    	}
    
    	public static int getuid(String s) {
    		return 13371604;
    	}
    
    	public static synchronized Socket opensocket(int i)
    			throws IOException
    	{
    		for (socketreq = i; socketreq != 0; )
    			try
    		{
    				Thread.sleep(50L);
    		}
    		catch (Exception localException) {
    		}
    		if (socket == null) {
    			throw new IOException("could not open socket");
    		}
    		return socket;
    	}
    
    	public static synchronized DataInputStream openurl(String s)
    			throws IOException
    	{
    		for (urlreq = s; urlreq != null; )
    			try
    		{
    				Thread.sleep(50L);
    		}
    		catch (Exception localException) {
    		}
    		if (urlstream == null) {
    			throw new IOException("could not open: " + s);
    		}
    		return urlstream;
    	}
    
    	public static synchronized void dnslookup(String s)
    	{
    		dns = s;
    		dnsreq = s;
    	}
    
    	public static synchronized void startthread(Runnable runnable, int i)
    	{
    		threadreqpri = i;
    		threadreq = runnable;
    	}
    
    	public static synchronized boolean wavesave(byte[] abyte0, int i)
    	{
    		return false;
    	}
    
    	public static synchronized boolean wavereplay()
    	{
    		if (savereq != null)
    		{
    			return false;
    		}
    
    		savebuf = null;
    		waveplay = true;
    		savereq = "sound" + wavepos + ".wav";
    		return true;
    	}
    
    	public static synchronized void midisave(byte[] abyte0, int i)
    	{
    	}
    
    	public static void reporterror(String s)
    	{
    		System.out.println("Error: " + s);
    	}
    }
    Thanks for reading
    King Regards,
    Solnes

    Owner & Developer of
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Oct 2011
    Posts
    2,102
    Thanks given
    0
    Thanks received
    1,041
    Rep Power
    3608
    is the cache downloading successfully on the mac os?
    Reply With Quote  
     

  7. #7  
    Novice Developer
    Solnes's Avatar
    Join Date
    Jul 2017
    Posts
    86
    Thanks given
    12
    Thanks received
    3
    Rep Power
    36
    Quote Originally Posted by Omelete View Post
    is the cache downloading successfully on the mac os?
    yes but when a mac user tries to log in it just says "Error connecting to server"
    Thanks for reading
    King Regards,
    Solnes

    Owner & Developer of
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Oct 2011
    Posts
    2,102
    Thanks given
    0
    Thanks received
    1,041
    Rep Power
    3608
    Quote Originally Posted by Solnes View Post
    yes but when a mac user tries to log in it just says "Error connecting to server"
    then that's not related to your cache, therefore that signlink class you just posted up is irrelevant.

    look into your ip, port, or portforwarding. the issue is somewhere there.
    Reply With Quote  
     

  9. #9  
    Novice Developer
    Solnes's Avatar
    Join Date
    Jul 2017
    Posts
    86
    Thanks given
    12
    Thanks received
    3
    Rep Power
    36
    Quote Originally Posted by Omelete View Post
    then that's not related to your cache, therefore that signlink class you just posted up is irrelevant.

    look into your ip, port, or portforwarding. the issue is somewhere there.
    But the thing i don't understand. I had an old source on my VPS and Mac users could join. But with the new one i just posted they can't join.
    Thanks for reading
    King Regards,
    Solnes

    Owner & Developer of
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] [317] Webclient for mac HELP
    By damoenceno22 in forum Help
    Replies: 2
    Last Post: 10-16-2015, 03:46 AM
  2. Looking to Create a 317 - Help needed
    By Unique_ in forum Requests
    Replies: 1
    Last Post: 05-23-2014, 12:30 PM
  3. [PI] clickItem help, need to fix for my quest.
    By SpawnInsanity in forum Help
    Replies: 0
    Last Post: 05-16-2013, 11:56 PM
  4. Few [PI] 317 issues need help please.
    By mighty in forum Help
    Replies: 4
    Last Post: 07-06-2012, 12:31 AM
  5. Replies: 1
    Last Post: 09-04-2010, 12:49 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •