forked from External/mage
download: reworked connection:
- added shareable code with default proxy, headers and other settings for download tasks like images, symbols, mtgjson, etc; - use XmageURLConnection.downloadText for text resources - use XmageURLConnection.downloadBinary for any file resources - added user agent with app version for all requests; - added http logs and improved error messages;
This commit is contained in:
parent
fad63389d0
commit
e1cffbde40
35 changed files with 713 additions and 464 deletions
|
|
@ -46,7 +46,7 @@ import mage.remote.Connection;
|
|||
import mage.remote.Connection.ProxyType;
|
||||
import mage.util.DebugUtil;
|
||||
import mage.util.ThreadUtils;
|
||||
import mage.util.XMageThreadFactory;
|
||||
import mage.util.XmageThreadFactory;
|
||||
import mage.utils.MageVersion;
|
||||
import mage.view.GameEndView;
|
||||
import mage.view.UserRequestMessage;
|
||||
|
|
@ -134,7 +134,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
private static final MageUI UI = new MageUI();
|
||||
|
||||
private static final ScheduledExecutorService PING_SENDER_EXECUTOR = Executors.newSingleThreadScheduledExecutor(
|
||||
new XMageThreadFactory(ThreadUtils.THREAD_PREFIX_CLIENT_PING_SENDER)
|
||||
new XmageThreadFactory(ThreadUtils.THREAD_PREFIX_CLIENT_PING_SENDER)
|
||||
);
|
||||
private static UpdateMemUsageTask updateMemUsageTask;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue