change port to const var
diff --git a/README.md b/README.md
index 0883ae5..7809cbc 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,10 @@
The following features are supported.
* Zookeeper registry center (√)
-* Tcp Transport and Hession serialize (√)
+* Tcp Transport
+* Serialize
+ * Hession serialize (√)
+ * Json serialize (√)
* Erlang project as a consumer (√)
* Erlang project as a provider (√)
* Sync invoker (√)
diff --git a/include/dubbo.hrl b/include/dubbo.hrl
index 016a7a0..f975fee 100644
--- a/include/dubbo.hrl
+++ b/include/dubbo.hrl
@@ -15,6 +15,8 @@
-define(DUBBO_MEGIC_HIGH, 16#da). %% new version 16#da
-define(DUBBO_MEGIC_LOW, 16#bb). %% new version 16#bb
+-define(DUBBO_DEFAULT_PORT,20880).
+
%% 序列化类型
-define(SERIALIZATION_HESSIAN,2).
-define(SERIALIZATION_FASTJSON,6).
diff --git a/src/dubboerl.erl b/src/dubboerl.erl
index 5f790df..a183d07 100644
--- a/src/dubboerl.erl
+++ b/src/dubboerl.erl
@@ -10,6 +10,8 @@
-author("dlive").
-include("dubboerl.hrl").
+-include("dubbo.hrl").
+
%% API
-export([init/0,start_consumer/0,start_provider/0]).
@@ -32,7 +34,7 @@
start_provider()->
ProviderList = application:get_env(dubboerl,provider,[]),
ApplicationName = application:get_env(dubboerl,application,<<"defaultApplication">>),
- DubboServerPort = application:get_env(dubboerl,port,20881),
+ DubboServerPort = application:get_env(dubboerl,port,?DUBBO_DEFAULT_PORT),
start_provider_listen(DubboServerPort),
lists:map(fun({ImplModuleName,BehaviourModuleName,Interface,Option})->
ok = dubbo_provider_protocol:register_impl_provider(Interface,ImplModuleName,BehaviourModuleName),